From a59551d7719a0d59a9e10ff6f314094c032203a6 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Wed, 10 Nov 2004 19:22:26 +0000 Subject: [PATCH] - Add new tests --- ext/spl/tests/iterator_016.phpt | 89 ++++++++++++++++++++ ext/spl/tests/sxe_004.phpt | 145 ++++++++++++++++++++++++++++++++ 2 files changed, 234 insertions(+) create mode 100755 ext/spl/tests/iterator_016.phpt create mode 100755 ext/spl/tests/sxe_004.phpt diff --git a/ext/spl/tests/iterator_016.phpt b/ext/spl/tests/iterator_016.phpt new file mode 100755 index 0000000000..d30f8cd100 --- /dev/null +++ b/ext/spl/tests/iterator_016.phpt @@ -0,0 +1,89 @@ +--TEST-- +SPL: RecursiveIteratorIterator and beginChildren/endChildren +--FILE-- +current()); + } + + function getChildren() + { + return new RecursiveArrayIterator($this->current()); + } +} + +class Menu extends ArrayObject +{ + function getIterator() + { + echo __METHOD__ . "\n"; + return new RecursiveArrayIterator($this); + } +} + +class MenuOutput extends RecursiveIteratorIterator +{ + function __construct(Menu $it) + { + parent::__construct($it); + } + function rewind() + { + echo "