From ff4ee6f043a44eb9d4a60ee55b047b42352ec852 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Mon, 6 Feb 2006 01:28:12 +0000 Subject: [PATCH] - MFH Add new tests --- ext/spl/tests/array_020.phpt | 66 ++++++++++++++++++++++++++++++++++++ ext/spl/tests/bug36287.phpt | 38 +++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100755 ext/spl/tests/array_020.phpt create mode 100755 ext/spl/tests/bug36287.phpt diff --git a/ext/spl/tests/array_020.phpt b/ext/spl/tests/array_020.phpt new file mode 100755 index 0000000000..cdeb4a216c --- /dev/null +++ b/ext/spl/tests/array_020.phpt @@ -0,0 +1,66 @@ +--TEST-- +SPL: ArrayIterator overloading +--SKIPIF-- + +--FILE-- + $v) +{ + var_dump($k); + var_dump($v); +} + +?> +===DONE=== + +--EXPECTF-- +ArrayIteratorEx::rewind +ArrayIteratorEx::valid +ArrayIteratorEx::current +ArrayIteratorEx::key +int(0) +int(1) +ArrayIteratorEx::next +ArrayIteratorEx::valid +ArrayIteratorEx::current +ArrayIteratorEx::key +int(1) +int(2) +ArrayIteratorEx::next +ArrayIteratorEx::valid +===DONE=== diff --git a/ext/spl/tests/bug36287.phpt b/ext/spl/tests/bug36287.phpt new file mode 100755 index 0000000000..dc04e116d4 --- /dev/null +++ b/ext/spl/tests/bug36287.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #36287 +--FILE-- +getFilename()); + } + echo "Second\n"; + if($file != "." && $file != "..") + { + var_dump($file->getFilename()); + } + if (++$idx > 1) + { + break; + } +} + +?> +===DONE=== +--EXPECTF-- +First +string(%d) "%s" +Second +string(%d) "%s" +First +string(%d) "%s" +Second +string(%d) "%s" +===DONE=== -- 2.50.1