summaryrefslogtreecommitdiff
path: root/ext/spl/tests/fixedarray_005.phpt
blob: 274fc34245a4dc9eca5ec5472dc4db19f700f03f (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
--TEST--
SPL: FixedArray: Invalid arguments
--FILE--
<?php

try {
	$a = new SplFixedArray(new stdClass);
} catch (TypeError $iae) {
	echo "Ok - ".$iae->getMessage().PHP_EOL;
}

try {
	$a = new SplFixedArray('FOO');
} catch (TypeError $iae) {
	echo "Ok - ".$iae->getMessage().PHP_EOL;
}

try {
	$a = new SplFixedArray('');
} catch (TypeError $iae) {
	echo "Ok - ".$iae->getMessage().PHP_EOL;
}

?>
--EXPECT--
Ok - SplFixedArray::__construct() expects parameter 1 to be int, object given
Ok - SplFixedArray::__construct() expects parameter 1 to be int, string given
Ok - SplFixedArray::__construct() expects parameter 1 to be int, string given