Annotation of embedaddon/php/ext/spl/tests/spl_iterator_iterator_constructor.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: SPL: IteratorInterator constructor checks 
                      3: --CREDITS--
                      4: Sean Burlington www.practicalweb.co.uk
                      5: TestFest London May 2009
                      6: --FILE--
                      7: <?php
                      8: 
                      9:   //I think this is testing line 1297 of spl_iterators.c
                     10: 
                     11:   $array = array(array(7,8,9),1,2,3,array(4,5,6));
                     12: $arrayIterator = new ArrayIterator($array);
                     13: try {
                     14: $test = new IteratorIterator($arrayIterator);
                     15: 
                     16: $test = new IteratorIterator($arrayIterator, 1);
                     17: $test = new IteratorIterator($arrayIterator, 1, 1);
                     18: $test = new IteratorIterator($arrayIterator, 1, 1, 1);
                     19: $test = new IteratorIterator($arrayIterator, 1, 1, 1, 1);
                     20: 
                     21: } catch (InvalidArgumentException $e){
                     22:   print  $e->getMessage() . "\n";
                     23: }
                     24: 
                     25: 
                     26: ?>
                     27: ===DONE===
                     28: --EXPECTF--
                     29: IteratorIterator::__construct() expects at most 2 parameters, 3 given
                     30: ===DONE===

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