File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
spl /
tests /
spl_iterator_iterator_constructor.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:01 2012 UTC (13 years, 4 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
SPL: IteratorInterator constructor checks
--CREDITS--
Sean Burlington www.practicalweb.co.uk
TestFest London May 2009
--FILE--
<?php
//I think this is testing line 1297 of spl_iterators.c
$array = array(array(7,8,9),1,2,3,array(4,5,6));
$arrayIterator = new ArrayIterator($array);
try {
$test = new IteratorIterator($arrayIterator);
$test = new IteratorIterator($arrayIterator, 1);
$test = new IteratorIterator($arrayIterator, 1, 1);
$test = new IteratorIterator($arrayIterator, 1, 1, 1);
$test = new IteratorIterator($arrayIterator, 1, 1, 1, 1);
} catch (InvalidArgumentException $e){
print $e->getMessage() . "\n";
}
?>
===DONE===
--EXPECTF--
IteratorIterator::__construct() expects at most 2 parameters, 3 given
===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>