PHP Classes

File: vendor/pimple/pimple/ext/pimple/tests/017_1.phpt

Recommend this page to a friend!
  Classes of uche   Farm Price   vendor/pimple/pimple/ext/pimple/tests/017_1.phpt   Download  
File: vendor/pimple/pimple/ext/pimple/tests/017_1.phpt
Role: Example script
Content type: text/plain
Description: Example script
Class: Farm Price
API to get the prices from agriculture markets
Author: By
Last change:
Date: 3 years ago
Size: 385 bytes
 

Contents

Class file image Download
--TEST--
Test extend() with exception in service factory
--SKIPIF--
<?php if (!extension_loaded("pimple")) print "skip"; ?>
--FILE--
<?php

$p
= new Pimple\Container();
$p[12] = function ($v) { throw new BadMethodCallException; };

$c = $p->extend(12, function ($w) { return 'foobar'; });

try {
   
$p[12];
    echo
"Exception expected";
} catch (
BadMethodCallException $e) { }
--
EXPECTF--