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

1.1       misho       1: --TEST--
                      2: SPL: iterator_count() exceptions test
                      3: --CREDITS--
                      4: Lance Kesson jac_kesson@hotmail.com
                      5: #testfest London 2009-05-09
                      6: --FILE--
                      7: <?php
                      8: $array=array('a','b');
                      9: 
                     10: $iterator = new ArrayIterator($array);
                     11: 
                     12: iterator_count();
                     13: 
                     14: 
                     15: iterator_count($iterator,'1');
                     16: 
                     17: iterator_count('1');
                     18: 
                     19: 
                     20: ?>
                     21: --EXPECTF--
                     22: Warning: iterator_count() expects exactly 1 parameter, 0 given in %s
                     23: 
                     24: Warning: iterator_count() expects exactly 1 parameter, 2 given in %s
                     25: 
                     26: Catchable fatal error: Argument 1 passed to iterator_count() must implement interface Traversable, %unicode_string_optional% given %s

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