1--TEST--
2SPL: RecursiveTreeIterator::setPrefixPart() Test arguments
3--CREDITS--
4Roshan Abraham (roshanabrahams@gmail.com)
5TestFest London May 2009
6--FILE--
7<?php
8
9$arr = array(
10 "a" => array("b")
11);
12
13$it = new RecursiveArrayIterator($arr);
14$it = new RecursiveTreeIterator($it);
15
16$it->setPrefixPart(1); // Should throw a warning as setPrefixPart expects 2 arguments
17
18$a = new stdClass();
19$it->setPrefixPart($a, 1); // Should throw a warning as setPrefixPart expects argument 1 to be long integer
20
21$it->setPrefixPart(1, $a); // Should throw a warning as setPrefixPart expects argument 2 to be a string
22
23
24?>
25===DONE===
26--EXPECTF--
27Warning: RecursiveTreeIterator::setPrefixPart() expects exactly 2 parameters, 1 given in %s on line %d
28
29Warning: RecursiveTreeIterator::setPrefixPart() expects parameter 1 to be integer, object given in %s on line %d
30
31Warning: RecursiveTreeIterator::setPrefixPart() expects parameter 2 to be string, object given in %s on line %d
32===DONE===
33