iterator_count.phpt 566 B

1234567891011121314151617181920212223242526
  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. $iterator = new ArrayIterator($array);
  10. iterator_count();
  11. iterator_count($iterator,'1');
  12. iterator_count('1');
  13. ?>
  14. --EXPECTF--
  15. Warning: iterator_count() expects exactly 1 parameter, 0 given in %s
  16. Warning: iterator_count() expects exactly 1 parameter, 2 given in %s
  17. Catchable fatal error: Argument 1 passed to iterator_count() must implement interface Traversable, %unicode_string_optional% given %s