Annotation of embedaddon/php/ext/spl/tests/iterator_026.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: SPL: CachingIterator::hasNext()
                      3: --FILE--
                      4: <?php
                      5: 
                      6: $ar = array(1, 2, array(31, 32, array(331)), 4);
                      7: 
                      8: $it = new RecursiveArrayIterator($ar);
                      9: $it = new RecursiveCachingIterator($it);
                     10: $it = new RecursiveIteratorIterator($it);
                     11: 
                     12: foreach($it as $k=>$v)
                     13: {
                     14:        echo "$k=>$v\n";
                     15:        echo "hasNext: " . ($it->getInnerIterator()->hasNext() ? "yes" : "no") . "\n";
                     16: }
                     17: 
                     18: ?>
                     19: ===DONE===
                     20: <?php exit(0); ?>
                     21: --EXPECTF--
                     22: 0=>1
                     23: hasNext: yes
                     24: 1=>2
                     25: hasNext: yes
1.1.1.2 ! misho      26: 
        !            27: Notice: Array to string conversion in %siterator_026.php on line %d
1.1       misho      28: 0=>31
                     29: hasNext: yes
                     30: 1=>32
                     31: hasNext: yes
1.1.1.2 ! misho      32: 
        !            33: Notice: Array to string conversion in %siterator_026.php on line %d
1.1       misho      34: 0=>331
                     35: hasNext: no
                     36: 3=>4
                     37: hasNext: no
                     38: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>