summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplFixedArray_setSize_param_array.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/SplFixedArray_setSize_param_array.phpt')
-rw-r--r--ext/spl/tests/SplFixedArray_setSize_param_array.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/spl/tests/SplFixedArray_setSize_param_array.phpt b/ext/spl/tests/SplFixedArray_setSize_param_array.phpt
new file mode 100644
index 0000000..269a45d
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_setSize_param_array.phpt
@@ -0,0 +1,18 @@
+--TEST--
+SplFixedArray::setSize() with an array parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+$fixed_array = new SplFixedArray(2);
+$fixed_array->setSize(array());
+var_dump($fixed_array);
+?>
+--EXPECTF--
+Warning: SplFixedArray::setSize() expects parameter 1 to be long, array given in %s on line %d
+object(SplFixedArray)#1 (2) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+}