summaryrefslogtreecommitdiff
path: root/tests/classes
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-02-25 20:58:33 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-02-26 15:00:08 +0100
commit960318ed95d17bd30c2896e2f3189ebffb965dce (patch)
tree2890972c266dabe649a44b540869a49e41a3e450 /tests/classes
parentc7094d892639fedffb67c273f8fd44f3ffff86d6 (diff)
downloadphp-git-960318ed95d17bd30c2896e2f3189ebffb965dce.tar.gz
Change argument error message format
Closes GH-5211
Diffstat (limited to 'tests/classes')
-rw-r--r--tests/classes/abstract_user_call.phpt2
-rw-r--r--tests/classes/autoload_009.phpt2
-rw-r--r--tests/classes/autoload_012.phpt2
-rw-r--r--tests/classes/bug27504.phpt2
-rw-r--r--tests/classes/tostring_004.phpt2
-rw-r--r--tests/classes/type_hinting_001.phpt2
-rw-r--r--tests/classes/type_hinting_002.phpt2
-rw-r--r--tests/classes/type_hinting_003.phpt2
-rw-r--r--tests/classes/type_hinting_004.phpt12
9 files changed, 14 insertions, 14 deletions
diff --git a/tests/classes/abstract_user_call.phpt b/tests/classes/abstract_user_call.phpt
index ad96101386..cd8c5c7e36 100644
--- a/tests/classes/abstract_user_call.phpt
+++ b/tests/classes/abstract_user_call.phpt
@@ -29,4 +29,4 @@ try {
?>
--EXPECT--
test::func()
-call_user_func() expects argument #1 ($function) to be a valid callback, cannot call abstract method test_base::func()
+call_user_func(): Argument #1 ($function) must be a valid callback, cannot call abstract method test_base::func()
diff --git a/tests/classes/autoload_009.phpt b/tests/classes/autoload_009.phpt
index 7932fd4240..6903d9d8ba 100644
--- a/tests/classes/autoload_009.phpt
+++ b/tests/classes/autoload_009.phpt
@@ -13,7 +13,7 @@ function f(UndefClass $x)
f(new stdClass);
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: f() expects argument #1 ($x) to be of type UndefClass, stdClass given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: f(): Argument #1 ($x) must be of type UndefClass, stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): f(Object(stdClass))
#1 {main}
diff --git a/tests/classes/autoload_012.phpt b/tests/classes/autoload_012.phpt
index 7ed944dc48..7a168b3275 100644
--- a/tests/classes/autoload_012.phpt
+++ b/tests/classes/autoload_012.phpt
@@ -14,4 +14,4 @@ try {
?>
--EXPECT--
In autoload: string(6) "UndefC"
-call_user_func() expects argument #1 ($function) to be a valid callback, class 'UndefC' not found
+call_user_func(): Argument #1 ($function) must be a valid callback, class 'UndefC' not found
diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt
index a56efde2d9..74d14c8a40 100644
--- a/tests/classes/bug27504.phpt
+++ b/tests/classes/bug27504.phpt
@@ -27,5 +27,5 @@ try {
?>
--EXPECT--
Called function foo:bar(1)
-call_user_func_array() expects argument #1 ($function) to be a valid callback, cannot access private method foo::bar()
+call_user_func_array(): Argument #1 ($function) must be a valid callback, cannot access private method foo::bar()
Call to private method foo::bar() from context ''
diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt
index 02968a9b3b..987298baa5 100644
--- a/tests/classes/tostring_004.phpt
+++ b/tests/classes/tostring_004.phpt
@@ -53,7 +53,7 @@ try {
--EXPECT--
Object with no __toString():
Try 1:
-printf() expects argument #1 ($format) to be of type string, object given
+printf(): Argument #1 ($format) must be of type string, object given
Try 2:
diff --git a/tests/classes/type_hinting_001.phpt b/tests/classes/type_hinting_001.phpt
index ca476187f3..f1c1973cf3 100644
--- a/tests/classes/type_hinting_001.phpt
+++ b/tests/classes/type_hinting_001.phpt
@@ -32,7 +32,7 @@ $a->b($b);
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: FooBar::a() expects argument #1 ($foo) to be of type Foo, Blort given, called in %s on line 27 and defined in %s:12
+Fatal error: Uncaught TypeError: FooBar::a(): Argument #1 ($foo) must be of type Foo, Blort given, called in %s on line 27 and defined in %s:12
Stack trace:
#0 %s(%d): FooBar->a(Object(Blort))
#1 {main}
diff --git a/tests/classes/type_hinting_002.phpt b/tests/classes/type_hinting_002.phpt
index a491a26a62..765de66bab 100644
--- a/tests/classes/type_hinting_002.phpt
+++ b/tests/classes/type_hinting_002.phpt
@@ -11,7 +11,7 @@ $o = new Foo;
$o->a($o);
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Foo::a() expects argument #1 ($foo) to be of type NonExisting, Foo given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Foo::a(): Argument #1 ($foo) must be of type NonExisting, Foo given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): Foo->a(Object(Foo))
#1 {main}
diff --git a/tests/classes/type_hinting_003.phpt b/tests/classes/type_hinting_003.phpt
index c43f13dbef..fab088daae 100644
--- a/tests/classes/type_hinting_003.phpt
+++ b/tests/classes/type_hinting_003.phpt
@@ -57,7 +57,7 @@ array(1) {
int(25)
}
-Fatal error: Uncaught TypeError: Test::f1() expects argument #1 ($ar) to be of type array, int given, called in %s on line %d and defined in %s:%d
+Fatal error: Uncaught TypeError: Test::f1(): Argument #1 ($ar) must be of type array, int given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): Test::f1(1)
#1 {main}
diff --git a/tests/classes/type_hinting_004.phpt b/tests/classes/type_hinting_004.phpt
index 299ec1dd46..2ba8870b0a 100644
--- a/tests/classes/type_hinting_004.phpt
+++ b/tests/classes/type_hinting_004.phpt
@@ -144,10 +144,10 @@ Ensure type hints are enforced for functions invoked as callbacks.
?>
--EXPECTF--
---> Type hints with callback function:
-0: f1() expects argument #1 ($a) to be of type A, int given%s(%d)
+0: f1(): Argument #1 ($a) must be of type A, int given%s(%d)
in f1;
-0: f2() expects argument #1 ($a) to be of type ?A, int given%s(%d)
+0: f2(): Argument #1 ($a) must be of type ?A, int given%s(%d)
in f2;
in f2;
@@ -155,10 +155,10 @@ in f2;
---> Type hints with callback static method:
-0: C::f1() expects argument #1 ($a) to be of type A, int given%s(%d)
+0: C::f1(): Argument #1 ($a) must be of type A, int given%s(%d)
in C::f1 (static);
-0: C::f2() expects argument #1 ($a) to be of type ?A, int given%s(%d)
+0: C::f2(): Argument #1 ($a) must be of type ?A, int given%s(%d)
in C::f2 (static);
in C::f2 (static);
@@ -166,10 +166,10 @@ in C::f2 (static);
---> Type hints with callback instance method:
-0: D::f1() expects argument #1 ($a) to be of type A, int given%s(%d)
+0: D::f1(): Argument #1 ($a) must be of type A, int given%s(%d)
in C::f1 (instance);
-0: D::f2() expects argument #1 ($a) to be of type ?A, int given%s(%d)
+0: D::f2(): Argument #1 ($a) must be of type ?A, int given%s(%d)
in C::f2 (instance);
in C::f2 (instance);