summaryrefslogtreecommitdiff
path: root/ext/spl/tests/iterator_count.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/iterator_count.phpt')
-rw-r--r--ext/spl/tests/iterator_count.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/spl/tests/iterator_count.phpt b/ext/spl/tests/iterator_count.phpt
new file mode 100644
index 0000000..9aa4e11
--- /dev/null
+++ b/ext/spl/tests/iterator_count.phpt
@@ -0,0 +1,26 @@
+--TEST--
+SPL: iterator_count() exceptions test
+--CREDITS--
+Lance Kesson jac_kesson@hotmail.com
+#testfest London 2009-05-09
+--FILE--
+<?php
+$array=array('a','b');
+
+$iterator = new ArrayIterator($array);
+
+iterator_count();
+
+
+iterator_count($iterator,'1');
+
+iterator_count('1');
+
+
+?>
+--EXPECTF--
+Warning: iterator_count() expects exactly 1 parameter, 0 given in %s
+
+Warning: iterator_count() expects exactly 1 parameter, 2 given in %s
+
+Catchable fatal error: Argument 1 passed to iterator_count() must implement interface Traversable, %unicode_string_optional% given %s