diff options
author | Gabriel Caruso <carusogabriel34@gmail.com> | 2020-04-16 01:39:51 +0200 |
---|---|---|
committer | Gabriel Caruso <carusogabriel34@gmail.com> | 2020-04-16 10:34:58 +0200 |
commit | 75a58ba5226b45b4e2d68e859fc3517b9c7de6dd (patch) | |
tree | 95ad340c4763148c3366ec5ecc0eab699445fb16 /Zend/tests | |
parent | 481caf17bc4e40fd437e6ed51cb4c97ed8c10e96 (diff) | |
download | php-git-75a58ba5226b45b4e2d68e859fc3517b9c7de6dd.tar.gz |
Improve error messages for magic methods by appending method's class
Closes GH-5397.
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/bug61025.phpt | 4 | ||||
-rw-r--r-- | Zend/tests/bug65322.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/bug67436/bug67436.phpt | 4 | ||||
-rw-r--r-- | Zend/tests/bug67436/bug67436_nohandler.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/bug70215.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/errmsg_045.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_002.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_003.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_004.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_005.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_006.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_007.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_008.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_009.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/magic_methods_010.phpt | 2 |
15 files changed, 17 insertions, 17 deletions
diff --git a/Zend/tests/bug61025.phpt b/Zend/tests/bug61025.phpt index f6731535fb..54f6443f85 100644 --- a/Zend/tests/bug61025.phpt +++ b/Zend/tests/bug61025.phpt @@ -20,9 +20,9 @@ echo $b->__invoke(); ?> --EXPECTF-- -Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d +Warning: The magic method InvokeAble::__invoke() must have public visibility and cannot be static in %sbug61025.php on line %d -Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d +Warning: The magic method Bar::__invoke() must have public visibility and cannot be static in %sbug61025.php on line %d Bar Fatal error: Uncaught Error: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d Stack trace: diff --git a/Zend/tests/bug65322.phpt b/Zend/tests/bug65322.phpt index 2ae2780bb6..9b5da8e4b7 100644 --- a/Zend/tests/bug65322.phpt +++ b/Zend/tests/bug65322.phpt @@ -19,6 +19,6 @@ eval('class A { private function __invoke() { } }'); ?> --EXPECTF-- -string(76) "The magic method __invoke() must have public visibility and cannot be static" +string(%d) "The magic method A::__invoke() must have public visibility and cannot be static" string(%d) "%s(%d) : eval()'d code" string(1) "X" diff --git a/Zend/tests/bug67436/bug67436.phpt b/Zend/tests/bug67436/bug67436.phpt index 0d8ec87006..ade29731ae 100644 --- a/Zend/tests/bug67436/bug67436.phpt +++ b/Zend/tests/bug67436/bug67436.phpt @@ -21,7 +21,7 @@ a::staticTest(); $b = new b(); $b->test(); ---EXPECT-- -string(76) "The magic method __invoke() must have public visibility and cannot be static" +--EXPECTF-- +string(%d) "The magic method b::__invoke() must have public visibility and cannot be static" b::test() a::test(c::TESTCONSTANT) diff --git a/Zend/tests/bug67436/bug67436_nohandler.phpt b/Zend/tests/bug67436/bug67436_nohandler.phpt index 64c7f70642..abccfb62f4 100644 --- a/Zend/tests/bug67436/bug67436_nohandler.phpt +++ b/Zend/tests/bug67436/bug67436_nohandler.phpt @@ -14,6 +14,6 @@ a::staticTest(); $b = new b(); $b->test(); --EXPECTF-- -Warning: The magic method __invoke() must have public visibility and cannot be static in %s on line %d +Warning: The magic method b::__invoke() must have public visibility and cannot be static in %s on line %d b::test() a::test(c::TESTCONSTANT) diff --git a/Zend/tests/bug70215.phpt b/Zend/tests/bug70215.phpt index 851a6b855e..76a9672225 100644 --- a/Zend/tests/bug70215.phpt +++ b/Zend/tests/bug70215.phpt @@ -17,5 +17,5 @@ $b(); ?> --EXPECTF-- -Warning: The magic method __invoke() must have public visibility and cannot be static in %s on line %d +Warning: The magic method A::__invoke() must have public visibility and cannot be static in %s on line %d A diff --git a/Zend/tests/errmsg_045.phpt b/Zend/tests/errmsg_045.phpt index 172f56f26b..35e6c7b00f 100644 --- a/Zend/tests/errmsg_045.phpt +++ b/Zend/tests/errmsg_045.phpt @@ -14,7 +14,7 @@ eval('class A { private function __invoke() { } }'); ?> --EXPECTF-- -string(76) "The magic method __invoke() must have public visibility and cannot be static" +string(%d) "The magic method A::__invoke() must have public visibility and cannot be static" string(%d) "%s(%d) : eval()'d code" Warning: Undefined variable $undefined in %s on line %d diff --git a/Zend/tests/magic_methods_002.phpt b/Zend/tests/magic_methods_002.phpt index fdbb97be40..dbd4977ad6 100644 --- a/Zend/tests/magic_methods_002.phpt +++ b/Zend/tests/magic_methods_002.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method __unset() must have public visibility and cannot be static in %s on line %d +Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_003.phpt b/Zend/tests/magic_methods_003.phpt index cd96d15b2f..d2207e9db7 100644 --- a/Zend/tests/magic_methods_003.phpt +++ b/Zend/tests/magic_methods_003.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method __unset() must have public visibility and cannot be static in %s on line %d +Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_004.phpt b/Zend/tests/magic_methods_004.phpt index 3c1df73d09..695747fdc7 100644 --- a/Zend/tests/magic_methods_004.phpt +++ b/Zend/tests/magic_methods_004.phpt @@ -11,4 +11,4 @@ class foo { ?> --EXPECTF-- -Warning: The magic method __unset() must have public visibility and cannot be static in %s on line %d +Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_005.phpt b/Zend/tests/magic_methods_005.phpt index 8e7749381c..14704c9229 100644 --- a/Zend/tests/magic_methods_005.phpt +++ b/Zend/tests/magic_methods_005.phpt @@ -9,4 +9,4 @@ interface a { ?> --EXPECTF-- -Warning: The magic method __call() must have public visibility and cannot be static in %s on line %d +Warning: The magic method a::__call() must have public visibility and cannot be static in %s on line %d diff --git a/Zend/tests/magic_methods_006.phpt b/Zend/tests/magic_methods_006.phpt index 68eac7439d..92c01636ce 100644 --- a/Zend/tests/magic_methods_006.phpt +++ b/Zend/tests/magic_methods_006.phpt @@ -9,4 +9,4 @@ interface a { ?> --EXPECTF-- -Warning: The magic method __callStatic() must have public visibility and be static in %s on line %d +Warning: The magic method a::__callStatic() must have public visibility and be static in %s on line %d diff --git a/Zend/tests/magic_methods_007.phpt b/Zend/tests/magic_methods_007.phpt index 63f4cadff5..dd7714e5df 100644 --- a/Zend/tests/magic_methods_007.phpt +++ b/Zend/tests/magic_methods_007.phpt @@ -9,6 +9,6 @@ abstract class b { ?> --EXPECTF-- -Warning: The magic method __set() must have public visibility and cannot be static in %s on line %d +Warning: The magic method b::__set() must have public visibility and cannot be static in %s on line %d Fatal error: Method b::__set() must take exactly 2 arguments in %s on line %d diff --git a/Zend/tests/magic_methods_008.phpt b/Zend/tests/magic_methods_008.phpt index 7d7a839afe..de99ecafd9 100644 --- a/Zend/tests/magic_methods_008.phpt +++ b/Zend/tests/magic_methods_008.phpt @@ -14,6 +14,6 @@ class a extends b { ?> --EXPECTF-- -Warning: The magic method __set() must have public visibility and cannot be static in %s on line %d +Warning: The magic method a::__set() must have public visibility and cannot be static in %s on line %d Fatal error: Access level to a::__set() must be public (as in class b) in %s on line 8 diff --git a/Zend/tests/magic_methods_009.phpt b/Zend/tests/magic_methods_009.phpt index ff609ce452..17a99cef48 100644 --- a/Zend/tests/magic_methods_009.phpt +++ b/Zend/tests/magic_methods_009.phpt @@ -10,4 +10,4 @@ class a { ?> --EXPECTF-- -Warning: The magic method __callStatic() must have public visibility and be static in %s on line %d +Warning: The magic method a::__callStatic() must have public visibility and be static in %s on line %d diff --git a/Zend/tests/magic_methods_010.phpt b/Zend/tests/magic_methods_010.phpt index 8ec3f23e61..6118bda67b 100644 --- a/Zend/tests/magic_methods_010.phpt +++ b/Zend/tests/magic_methods_010.phpt @@ -10,6 +10,6 @@ class a { ?> --EXPECTF-- -Warning: The magic method __toString() must have public visibility and cannot be static in %s on line %d +Warning: The magic method a::__toString() must have public visibility and cannot be static in %s on line %d Fatal error: Method a::__tostring() cannot take arguments in %s on line %d |