From c11b2b809d349399c8f4b54c6bf24078dece455e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pedro=20Magalh=C3=A3es?= Date: Fri, 27 Jan 2017 19:44:46 +0100 Subject: [PATCH] Added tests demonstrating the same effect with abstracts --- Zend/tests/bug73987.phpt | 2 +- Zend/tests/bug73987_1.phpt | 2 +- Zend/tests/bug73987_2.phpt | 20 ++++++++++++++++++++ Zend/tests/bug73987_3.phpt | 20 ++++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 Zend/tests/bug73987_2.phpt create mode 100644 Zend/tests/bug73987_3.phpt diff --git a/Zend/tests/bug73987.phpt b/Zend/tests/bug73987.phpt index 551565650c..610b594a64 100644 --- a/Zend/tests/bug73987.phpt +++ b/Zend/tests/bug73987.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #73987 (Method compatibility check looks to original definition and not parent) +Bug #73987 (Method compatibility check looks to original definition and not parent - nullability interface) --FILE-- +--EXPECTF-- +Fatal error: Declaration of C::example($a, $b, $c = NULL) must be compatible with B::example($a, $b = NULL, $c = NULL) in %s diff --git a/Zend/tests/bug73987_3.phpt b/Zend/tests/bug73987_3.phpt new file mode 100644 index 0000000000..89e4686ed6 --- /dev/null +++ b/Zend/tests/bug73987_3.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #73987 (Method compatibility check looks to original definition and not parent - return types abstract) +--FILE-- + +--EXPECTF-- +Fatal error: Declaration of C::example(): string must be compatible with B::example(): int in %s -- 2.50.1