From 91ac043e7e857d1f47f0bb741e3da5a51d53639f Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Mon, 20 Nov 2006 19:55:54 +0000 Subject: [PATCH] - Add new test --- ext/spl/tests/spl_006.phpt | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 ext/spl/tests/spl_006.phpt diff --git a/ext/spl/tests/spl_006.phpt b/ext/spl/tests/spl_006.phpt new file mode 100755 index 0000000000..89859624db --- /dev/null +++ b/ext/spl/tests/spl_006.phpt @@ -0,0 +1,41 @@ +--TEST-- +SPL: iterator_to_array() without keys +--SKIPIF-- + +--FILE-- +append(new ArrayIterator(array(1,2))); +$it->append(new ArrayIterator(array(2,3))); + +var_dump(iterator_to_array($it)); +var_dump(iterator_to_array($it, false)); +var_dump(iterator_to_array($it, true)); + +?> +===DONE=== +--EXPECT-- +array(2) { + [0]=> + int(2) + [1]=> + int(3) +} +array(4) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(2) + [3]=> + int(3) +} +array(2) { + [0]=> + int(2) + [1]=> + int(3) +} +===DONE=== -- 2.50.1