1--TEST--
2SPL: IteratorInterator constructor checks
3--CREDITS--
4Sean Burlington www.practicalweb.co.uk
5TestFest London May 2009
6--FILE--
7<?php
8
9$array = array(array(7,8,9),1,2,3,array(4,5,6));
10$arrayIterator = new ArrayIterator($array);
11try {
12    $test = new IteratorIterator($arrayIterator);
13
14    $test = new IteratorIterator($arrayIterator, 1);
15    $test = new IteratorIterator($arrayIterator, 1, 1);
16    $test = new IteratorIterator($arrayIterator, 1, 1, 1);
17    $test = new IteratorIterator($arrayIterator, 1, 1, 1, 1);
18} catch (TypeError $e){
19  echo $e->getMessage() . "\n";
20}
21
22?>
23--EXPECT--
24IteratorIterator::__construct() expects at most 2 arguments, 3 given
25