Annotation of embedaddon/php/ext/spl/tests/recursiveiteratoriterator_getsubiterator_basic.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SPL: RecursiveIteratorIterator::getSubIterator() returns iterator passed in constructor
3: --CREDITS--
4: Matt Raines matt@raines.me.uk
5: #testfest London 2009-05-09
6: --FILE--
7: <?php
8: $sample_array = array(1, 2, array(3, 4));
9:
10: $sub_iterator = new RecursiveArrayIterator($sample_array);
11: $not_sub_iterator = new RecursiveArrayIterator($sample_array);
12: $iterator = new RecursiveIteratorIterator($sub_iterator);
13:
14: var_dump($iterator->getSubIterator() === $sub_iterator);
15: var_dump($iterator->getSubIterator() === $not_sub_iterator);
16: ?>
17: --EXPECT--
18: bool(true)
19: bool(false)
20:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>