summaryrefslogtreecommitdiff
path: root/ext/spl/tests/iterator_019.phpt
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-01-27 00:34:13 +0000
committerMarcus Boerger <helly@php.net>2005-01-27 00:34:13 +0000
commit5cabd2f12bf78a04f4a9303b52687e1e8cf8f347 (patch)
tree9c10e299e03a0a213e79d2c0d6f8b123209b9bfc /ext/spl/tests/iterator_019.phpt
parentfaba10853f4939d0fdb04f647d38887c150204da (diff)
downloadphp-git-5cabd2f12bf78a04f4a9303b52687e1e8cf8f347.tar.gz
- Move tests to proper location now that the tested classes are hardcoded
Diffstat (limited to 'ext/spl/tests/iterator_019.phpt')
-rwxr-xr-xext/spl/tests/iterator_019.phpt33
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/spl/tests/iterator_019.phpt b/ext/spl/tests/iterator_019.phpt
new file mode 100755
index 0000000000..09842b0988
--- /dev/null
+++ b/ext/spl/tests/iterator_019.phpt
@@ -0,0 +1,33 @@
+--TEST--
+SPL: NoRweindIterator
+--FILE--
+<?php
+
+echo "===Current===\n";
+
+$it = new NoRewindIterator(new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C')));
+
+echo $it->key() . '=>' . $it->current() . "\n";
+
+echo "===Next===\n";
+
+$it->next();
+
+echo "===Foreach===\n";
+
+foreach($it as $key=>$val)
+{
+ echo "$key=>$val\n";
+}
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+===Current===
+0=>A
+===Next===
+===Foreach===
+1=>B
+2=>C
+===DONE===