diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/spl/tests/iterator_to_array.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/spl/tests/iterator_to_array.phpt')
-rw-r--r-- | ext/spl/tests/iterator_to_array.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/spl/tests/iterator_to_array.phpt b/ext/spl/tests/iterator_to_array.phpt new file mode 100644 index 0000000..958d370 --- /dev/null +++ b/ext/spl/tests/iterator_to_array.phpt @@ -0,0 +1,25 @@ +--TEST-- +SPL: iterator_to_array() 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_to_array(); + + +iterator_to_array($iterator,'test','test'); + +iterator_to_array('test','test'); + +?> +--EXPECTF-- +Warning: iterator_to_array() expects at least 1 parameter, 0 given in %s + +Warning: iterator_to_array() expects at most 2 parameters, 3 given in %s + +Catchable fatal error: Argument 1 passed to iterator_to_array() must implement interface Traversable, %unicode_string_optional% given %s |