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