diff options
Diffstat (limited to 'ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt')
-rw-r--r-- | ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt b/ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt new file mode 100644 index 0000000..40a372b --- /dev/null +++ b/ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt @@ -0,0 +1,15 @@ +--TEST-- +SPL FixedArray offsetUnset throws error on no parameter +--CREDITS-- +PHPNW TestFest 2009 - Ben Longden +--FILE-- +<?php +$array = new SplFixedArray(5); +$a = $array->offsetUnset(); +if(is_null($a)) { + echo 'PASS'; +} +?> +--EXPECTF-- +Warning: SplFixedArray::offsetUnset() expects exactly 1 parameter, 0 given in %s on line %d +PASS |