"Fossies" - the Fresh Open Source Software Archive

Member "ILIAS-5.4.9/libs/composer/vendor/pimple/pimple/ext/pimple/tests/008.phpt" (24 Jan 2020, 501 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 frozen services
    3 --SKIPIF--
    4 <?php if (!extension_loaded("pimple")) print "skip"; ?>
    5 --FILE--
    6 <?php 
    7 $p = new Pimple\Container();
    8 $p[42] = 'foo';
    9 $p[42] = 'bar';
   10 
   11 $p['foo'] = function () { };
   12 $p['foo'] = function () { };
   13 
   14 $a = $p['foo'];
   15 
   16 try {
   17 	$p['foo'] = function () { };
   18 	echo "Exception excpected";
   19 } catch (RuntimeException $e) { }
   20 
   21 $p[42] = function() { };
   22 $a = $p[42];
   23 
   24 try {
   25 	$p[42] = function () { };
   26 	echo "Exception excpected";
   27 } catch (RuntimeException $e) { }
   28 ?>
   29 --EXPECTF--