summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/array_diff_assoc_variation2.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/array/array_diff_assoc_variation2.phpt')
-rw-r--r--ext/standard/tests/array/array_diff_assoc_variation2.phpt116
1 files changed, 34 insertions, 82 deletions
diff --git a/ext/standard/tests/array/array_diff_assoc_variation2.phpt b/ext/standard/tests/array/array_diff_assoc_variation2.phpt
index a57f10fce0..9185b53439 100644
--- a/ext/standard/tests/array/array_diff_assoc_variation2.phpt
+++ b/ext/standard/tests/array/array_diff_assoc_variation2.phpt
@@ -91,143 +91,95 @@ $inputs = array(
// loop through each element of $inputs to check the behavior of array_diff_assoc
$iterator = 1;
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( array_diff_assoc($array, $input));
- $iterator++;
+ echo "\n-- Iteration $iterator --\n";
+ try {
+ var_dump(array_diff_assoc($array, $input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
+ $iterator++;
};
fclose($fp);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_diff_assoc() : usage variations ***
-- Iteration 1 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 2 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 3 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 4 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, int given in %s on line %d
-NULL
+Expected parameter 2 to be an array, int given
-- Iteration 5 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 6 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 7 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 8 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 9 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, float given in %s on line %d
-NULL
+Expected parameter 2 to be an array, float given
-- Iteration 10 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 11 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 12 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 13 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 14 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 15 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, bool given in %s on line %d
-NULL
+Expected parameter 2 to be an array, bool given
-- Iteration 16 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 17 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 18 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 19 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 20 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 21 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 22 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, string given in %s on line %d
-NULL
+Expected parameter 2 to be an array, string given
-- Iteration 23 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, object given in %s on line %d
-NULL
+Expected parameter 2 to be an array, object given
-- Iteration 24 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 25 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, null given in %s on line %d
-NULL
+Expected parameter 2 to be an array, null given
-- Iteration 26 --
-
-Warning: array_diff_assoc(): Expected parameter 2 to be an array, resource given in %s on line %d
-NULL
+Expected parameter 2 to be an array, resource given
Done