"Fossies" - the Fresh Open Source Software Archive

Member "ILIAS-5.4.9/libs/composer/vendor/pimple/pimple/ext/pimple/tests/013.phpt" (24 Jan 2020, 368 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 keys()
    3 --SKIPIF--
    4 <?php if (!extension_loaded("pimple")) print "skip"; ?>
    5 --FILE--
    6 <?php
    7 
    8 $p = new Pimple\Container();
    9 
   10 var_dump($p->keys());
   11 
   12 $p['foo'] = 'bar';
   13 $p[] = 'foo';
   14 
   15 var_dump($p->keys());
   16 
   17 unset($p['foo']);
   18 
   19 var_dump($p->keys());
   20 ?>
   21 --EXPECTF--
   22 array(0) {
   23 }
   24 array(2) {
   25   [0]=>
   26   string(3) "foo"
   27   [1]=>
   28   int(0)
   29 }
   30 array(1) {
   31   [0]=>
   32   int(0)
   33 }