From cd0b49c72aee33b3e44a9c589fcd93b9e1c7a64f Mon Sep 17 00:00:00 2001 From: Sean Finney Date: Fri, 10 Apr 2009 14:09:48 +0200 Subject: Imported Upstream version 5.2.9.dfsg.1 --- ext/standard/tests/array/array_diff_key_error.phpt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ext/standard/tests/array/array_diff_key_error.phpt (limited to 'ext/standard/tests/array/array_diff_key_error.phpt') diff --git a/ext/standard/tests/array/array_diff_key_error.phpt b/ext/standard/tests/array/array_diff_key_error.phpt new file mode 100644 index 000000000..786c1f30c --- /dev/null +++ b/ext/standard/tests/array/array_diff_key_error.phpt @@ -0,0 +1,36 @@ +--TEST-- +Test array_diff_key() function : error conditions +--FILE-- + 1, 'red' => 2, 'green' => 3, 'purple' => 4); + +// Testing array_diff_key with one less than the expected number of arguments +echo "\n-- Testing array_diff_key() function with less than expected no. of arguments --\n"; +var_dump( array_diff_key($array1) ); + +// Testing array_diff_key with no arguments +echo "\n-- Testing array_diff_key() function with no arguments --\n"; +var_dump( array_diff_key() ); +?> +===DONE=== +--EXPECTF-- +*** Testing array_diff_key() : error conditions *** + +-- Testing array_diff_key() function with less than expected no. of arguments -- + +Warning: Wrong parameter count for array_diff_key() in %s on line %d +NULL + +-- Testing array_diff_key() function with no arguments -- + +Warning: Wrong parameter count for array_diff_key() in %s on line %d +NULL +===DONE=== -- cgit v1.2.3