From 03de75498d8e74e0bce8a1c588a9914a6c29e350 Mon Sep 17 00:00:00 2001 From: Etienne Kneuss Date: Mon, 28 Jul 2008 14:24:35 +0000 Subject: [PATCH] Increase coverage a bit --- ext/spl/tests/fixedarray_021.phpt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ext/spl/tests/fixedarray_021.phpt b/ext/spl/tests/fixedarray_021.phpt index aa8de1d34e..bb13300c00 100644 --- a/ext/spl/tests/fixedarray_021.phpt +++ b/ext/spl/tests/fixedarray_021.phpt @@ -50,6 +50,17 @@ try { 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 @@ int(0) object(SplFixedArray)#%d (0) { } unicode(52) "An iterator cannot be used with foreach by reference" +bool(false) +unicode(3) "foo" +bool(true) ==DONE== -- 2.50.1