summaryrefslogtreecommitdiff
path: root/ext/pcre/tests
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-01-29 20:06:13 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-02-17 14:22:17 +0100
commitac0853eb265784c4238af652de9c54c883ffa99f (patch)
treee9316872480304e9e74ce89bd15052965cc18438 /ext/pcre/tests
parent72bd55902d1908857f47555ad69458861e1acd94 (diff)
downloadphp-git-ac0853eb265784c4238af652de9c54c883ffa99f.tar.gz
Make type error messages more consistent
Closes GH-5092
Diffstat (limited to 'ext/pcre/tests')
-rw-r--r--ext/pcre/tests/preg_grep_error1.phpt4
-rw-r--r--ext/pcre/tests/preg_match_all_error1.phpt4
-rw-r--r--ext/pcre/tests/preg_match_all_error2.phpt4
-rw-r--r--ext/pcre/tests/preg_match_error1.phpt4
-rw-r--r--ext/pcre/tests/preg_match_error2.phpt6
-rw-r--r--ext/pcre/tests/preg_split_error1.phpt4
6 files changed, 13 insertions, 13 deletions
diff --git a/ext/pcre/tests/preg_grep_error1.phpt b/ext/pcre/tests/preg_grep_error1.phpt
index 1bf23bb640..5b191a72dc 100644
--- a/ext/pcre/tests/preg_grep_error1.phpt
+++ b/ext/pcre/tests/preg_grep_error1.phpt
@@ -57,7 +57,7 @@ Warning: preg_grep(): Unknown modifier 'F' in %spreg_grep_error1.php on line %d
bool(false)
Arg value is Array
-preg_grep() expects parameter 1 to be string, array given
+preg_grep() expects argument #1 ($regex) to be of type string, array given
Arg value is /[a-zA-Z]/
array(2) {
@@ -66,5 +66,5 @@ array(2) {
[2]=>
string(4) "test"
}
-preg_grep() expects parameter 1 to be string, object given
+preg_grep() expects argument #1 ($regex) to be of type string, object given
Done
diff --git a/ext/pcre/tests/preg_match_all_error1.phpt b/ext/pcre/tests/preg_match_all_error1.phpt
index 6a5a0055a9..3a65fca852 100644
--- a/ext/pcre/tests/preg_match_all_error1.phpt
+++ b/ext/pcre/tests/preg_match_all_error1.phpt
@@ -62,7 +62,7 @@ bool(false)
NULL
Arg value is Array
-preg_match_all() expects parameter 1 to be string, array given
+preg_match_all() expects argument #1 ($pattern) to be of type string, array given
NULL
Arg value is /[a-zA-Z]/
@@ -80,5 +80,5 @@ array(1) {
string(1) "t"
}
}
-preg_match_all() expects parameter 1 to be string, object given
+preg_match_all() expects argument #1 ($pattern) to be of type string, object given
NULL
diff --git a/ext/pcre/tests/preg_match_all_error2.phpt b/ext/pcre/tests/preg_match_all_error2.phpt
index 29762739c4..98e70385c0 100644
--- a/ext/pcre/tests/preg_match_all_error2.phpt
+++ b/ext/pcre/tests/preg_match_all_error2.phpt
@@ -23,11 +23,11 @@ foreach($input as $value) {
}
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing preg_match_all() : error conditions ***
Arg value is: Array
-preg_match_all() expects parameter 2 to be string, array given
+preg_match_all() expects argument #2 ($subject) to be of type string, array given
NULL
Arg value is: test
diff --git a/ext/pcre/tests/preg_match_error1.phpt b/ext/pcre/tests/preg_match_error1.phpt
index 2f1b39d67f..3dbb7c2f03 100644
--- a/ext/pcre/tests/preg_match_error1.phpt
+++ b/ext/pcre/tests/preg_match_error1.phpt
@@ -56,8 +56,8 @@ Warning: preg_match(): Unknown modifier 'F' in %spreg_match_error1.php on line %
bool(false)
Arg value is Array
-preg_match() expects parameter 1 to be string, array given
+preg_match() expects argument #1 ($pattern) to be of type string, array given
Arg value is /[a-zA-Z]/
int(1)
-preg_match() expects parameter 1 to be string, object given
+preg_match() expects argument #1 ($pattern) to be of type string, object given
diff --git a/ext/pcre/tests/preg_match_error2.phpt b/ext/pcre/tests/preg_match_error2.phpt
index 18a42c6445..bc48facc0a 100644
--- a/ext/pcre/tests/preg_match_error2.phpt
+++ b/ext/pcre/tests/preg_match_error2.phpt
@@ -28,13 +28,13 @@ try {
}
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing preg_match() : error conditions ***
Arg value is: this is a string
int(1)
Arg value is: Array
-preg_match() expects parameter 2 to be string, array given
-preg_match() expects parameter 2 to be string, object given
+preg_match() expects argument #2 ($subject) to be of type string, array given
+preg_match() expects argument #2 ($subject) to be of type string, object given
Done
diff --git a/ext/pcre/tests/preg_split_error1.phpt b/ext/pcre/tests/preg_split_error1.phpt
index b69caf1aed..0ec80d99f1 100644
--- a/ext/pcre/tests/preg_split_error1.phpt
+++ b/ext/pcre/tests/preg_split_error1.phpt
@@ -56,7 +56,7 @@ Warning: preg_split(): Unknown modifier 'F' in %spreg_split_error1.php on line %
bool(false)
Arg value is Array
-preg_split() expects parameter 1 to be string, array given
+preg_split() expects argument #1 ($pattern) to be of type string, array given
Arg value is /[a-zA-Z]/
array(3) {
@@ -67,4 +67,4 @@ array(3) {
[2]=>
string(4) " 5 6"
}
-preg_split() expects parameter 1 to be string, object given
+preg_split() expects argument #1 ($pattern) to be of type string, object given