cvs: php-src /ext/spl/tests fixedarray_021.phpt

From: Date: Mon, 28 Jul 2008 14:24:35 +0000
Subject: cvs: php-src /ext/spl/tests fixedarray_021.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-51680@lists.php.net to get a copy of this message
colder Mon Jul 28 14:24:35 2008 UTC Modified files: /php-src/ext/spl/tests fixedarray_021.phpt Log: Increase coverage a bit http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/fixedarray_021.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/spl/tests/fixedarray_021.phpt diff -u php-src/ext/spl/tests/fixedarray_021.phpt:1.2 php-src/ext/spl/tests/fixedarray_021.phpt:1.3 --- php-src/ext/spl/tests/fixedarray_021.phpt:1.2 Mon Jul 14 08:05:58 2008 +++ php-src/ext/spl/tests/fixedarray_021.phpt Mon Jul 28 14:24:35 2008 @@ -50,6 +50,17 @@ var_dump($e->getMessage()); } + +//non-long indexes +$a = new SplFixedArray(4); +$a["2"] = "foo"; +$a["1"] = "foo"; +$a["3"] = "0"; + +var_dump(isset($a["0"], $a[-1]), $a["1"]); +var_dump(empty($a["3"])); + + ?> ==DONE== --EXPECTF-- @@ -63,4 +74,7 @@ object(SplFixedArray)#%d (0) { } unicode(52) "An iterator cannot be used with foreach by reference" +bool(false) +unicode(3) "foo" +bool(true) ==DONE==

« previous php.cvs (#51680) next »