xref: /PHP-5.5/ext/spl/tests/iterator_count.phpt (revision 6f75314b)
1--TEST--
2SPL: iterator_count() exceptions test
3--CREDITS--
4Lance 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
12iterator_count();
13
14
15iterator_count($iterator,'1');
16
17iterator_count('1');
18
19
20?>
21--EXPECTF--
22Warning: iterator_count() expects exactly 1 parameter, 0 given in %s
23
24Warning: iterator_count() expects exactly 1 parameter, 2 given in %s
25
26Catchable fatal error: Argument 1 passed to iterator_count() must implement interface Traversable, %unicode_string_optional% given %s
27