]> granicus.if.org Git - php/commitdiff
- Add new test
authorMarcus Boerger <helly@php.net>
Thu, 18 May 2006 21:56:57 +0000 (21:56 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 18 May 2006 21:56:57 +0000 (21:56 +0000)
ext/spl/tests/iterator_038.phpt [new file with mode: 0755]

diff --git a/ext/spl/tests/iterator_038.phpt b/ext/spl/tests/iterator_038.phpt
new file mode 100755 (executable)
index 0000000..bc39a83
--- /dev/null
@@ -0,0 +1,27 @@
+--TEST--
+SPL: RoRewindIterator and string keys
+--SKIPIF--
+<?php if (!extension_loaded("spl")) print "skip"; ?>
+--FILE--
+<?php
+
+foreach(new NoRewindIterator(new ArrayIterator(array('Hello'=>0, 'World'=>1))) as $k => $v)
+{
+       var_dump($v);
+       var_dump($k);
+}
+
+?>
+===DONE===
+--EXPECT--
+int(0)
+string(5) "Hello"
+int(1)
+string(5) "World"
+===DONE===
+--UEXPECT--
+int(0)
+unicode(5) "Hello"
+int(1)
+unicode(5) "World"
+===DONE===