From: Marcus Boerger Date: Wed, 10 Nov 2004 19:22:26 +0000 (+0000) Subject: - Add new tests X-Git-Tag: RELEASE_0_2~713 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a59551d7719a0d59a9e10ff6f314094c032203a6;p=php - Add new tests --- 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 "