1--TEST-- 2SPL: IteratorInterator constructor checks 3--CREDITS-- 4Sean Burlington www.practicalweb.co.uk 5TestFest London May 2009 6--FILE-- 7<?php 8 9 //I think this is testing line 1297 of spl_iterators.c 10 11 $array = array(array(7,8,9),1,2,3,array(4,5,6)); 12$arrayIterator = new ArrayIterator($array); 13try { 14$test = new IteratorIterator($arrayIterator); 15 16$test = new IteratorIterator($arrayIterator, 1); 17$test = new IteratorIterator($arrayIterator, 1, 1); 18$test = new IteratorIterator($arrayIterator, 1, 1, 1); 19$test = new IteratorIterator($arrayIterator, 1, 1, 1, 1); 20 21} catch (InvalidArgumentException $e){ 22 print $e->getMessage() . "\n"; 23} 24 25 26?> 27===DONE=== 28--EXPECTF-- 29IteratorIterator::__construct() expects at most 2 parameters, 3 given 30===DONE=== 31