From 993e1866df547532a05ab6db76c9ff5aefc9a3df Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 25 Mar 2009 00:39:08 -0400 Subject: Imported Upstream version 5.2.6 --- ext/standard/tests/array/array_map_error.phpt | 73 +++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 ext/standard/tests/array/array_map_error.phpt (limited to 'ext/standard/tests/array/array_map_error.phpt') diff --git a/ext/standard/tests/array/array_map_error.phpt b/ext/standard/tests/array/array_map_error.phpt new file mode 100644 index 000000000..a1c93d0fc --- /dev/null +++ b/ext/standard/tests/array/array_map_error.phpt @@ -0,0 +1,73 @@ +--TEST-- +Test array_map() function : error conditions +--FILE-- + +--EXPECTF-- +*** Testing array_map() : error conditions *** + +-- Testing array_map() function with Zero arguments -- + +Warning: Wrong parameter count for array_map() in %s on line %d +NULL + +-- Testing array_map() function with one less than expected no. of arguments -- + +Warning: Wrong parameter count for array_map() in %s on line %d +NULL + +-- Testing array_map() function with less no. of arrays than callback function arguments -- + +Warning: Missing argument 2 for callback2() in %s on line %d + +Notice: Undefined variable: q in %s on line %d + +Warning: Missing argument 2 for callback2() in %s on line %d + +Notice: Undefined variable: q in %s on line %d +array(2) { + [0]=> + int(0) + [1]=> + int(0) +} + +-- Testing array_map() function with more no. of arrays than callback function arguments -- +array(2) { + [0]=> + int(3) + [1]=> + int(8) +} +Done -- cgit v1.2.3