summaryrefslogtreecommitdiff
path: root/ext/spl/tests/fixedarray_005.phpt
blob: 7240c0abc6d2f339d301db500970ac8d964a579d (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
--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;
}

?>
===DONE===
--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
===DONE===