cvs: php-src(PHP_5_3) /ext/spl/tests fixedarray_021.phpt
| From: | Etienne Kneuss | Date: | Mon, 28 Jul 2008 14:24:45 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/spl/tests fixedarray_021.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-51681@lists.php.net to get a copy of this message | ||
colder Mon Jul 28 14:24:45 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/spl/tests fixedarray_021.phpt
Log:
MFH: Increase coverage a bit
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/fixedarray_021.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/spl/tests/fixedarray_021.phpt
diff -u php-src/ext/spl/tests/fixedarray_021.phpt:1.1.2.2
php-src/ext/spl/tests/fixedarray_021.phpt:1.1.2.3
--- php-src/ext/spl/tests/fixedarray_021.phpt:1.1.2.2 Sun Jul 13 19:47:52 2008
+++ php-src/ext/spl/tests/fixedarray_021.phpt Mon Jul 28 14:24:45 2008
@@ -50,6 +50,15 @@
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 +72,7 @@
object(SplFixedArray)#%d (0) {
}
string(52) "An iterator cannot be used with foreach by reference"
+bool(false)
+string(3) "foo"
+bool(true)
==DONE==