"Fossies" - the Fresh Open Source Software Archive

Member "ILIAS-5.4.9/libs/composer/vendor/pimple/pimple/ext/pimple/tests/017.phpt" (24 Jan 2020, 383 Bytes) of package /linux/www/ILIAS-5.4.9.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 --TEST--
    2 Test extend() with exception in service extension
    3 --SKIPIF--
    4 <?php if (!extension_loaded("pimple")) print "skip"; ?>
    5 --FILE--
    6 <?php
    7 
    8 $p = new Pimple\Container();
    9 $p[12] = function ($v) { return 'foo';};
   10 
   11 $c = $p->extend(12, function ($w) { throw new BadMethodCallException; });
   12 
   13 try {
   14 	$p[12];
   15 	echo "Exception expected";
   16 } catch (BadMethodCallException $e) { }
   17 --EXPECTF--