summaryrefslogtreecommitdiff
path: root/Zend/tests
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests')
-rw-r--r--Zend/tests/argument_restriction_001.phpt16
-rw-r--r--Zend/tests/argument_restriction_002.phpt16
-rw-r--r--Zend/tests/argument_restriction_003.phpt19
-rw-r--r--Zend/tests/argument_restriction_004.phpt17
-rw-r--r--Zend/tests/argument_restriction_005.phpt11
-rw-r--r--Zend/tests/bug47981.phpt2
-rw-r--r--Zend/tests/bug51421.phpt2
-rw-r--r--Zend/tests/objects_002.phpt2
-rw-r--r--Zend/tests/objects_003.phpt2
-rw-r--r--Zend/tests/objects_004.phpt2
-rw-r--r--Zend/tests/objects_005.phpt2
-rw-r--r--Zend/tests/objects_006.phpt2
-rw-r--r--Zend/tests/objects_007.phpt2
-rw-r--r--Zend/tests/objects_008.phpt2
-rw-r--r--Zend/tests/objects_009.phpt2
-rw-r--r--Zend/tests/traits/inheritance003.phpt2
16 files changed, 90 insertions, 11 deletions
diff --git a/Zend/tests/argument_restriction_001.phpt b/Zend/tests/argument_restriction_001.phpt
new file mode 100644
index 0000000000..e62ad300c9
--- /dev/null
+++ b/Zend/tests/argument_restriction_001.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+Class Base {
+ public function &test($foo, array $bar, $option = NULL, $extra = "lllllllllllllllllllllllllllllllllllllllllllllllllll") {
+ }
+}
+
+class Sub extends Base {
+ public function &test() {
+ }
+}
+?>
+--EXPECTF--
+Strict Standards: Declaration of Sub::test() should be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_001.php on line %d
diff --git a/Zend/tests/argument_restriction_002.phpt b/Zend/tests/argument_restriction_002.phpt
new file mode 100644
index 0000000000..c6a472e0f5
--- /dev/null
+++ b/Zend/tests/argument_restriction_002.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+Abstract Class Base {
+ public function test($foo, array &$bar, $option = NULL, $extra = 3.141592653589793238462643383279502884197169399375105 ) {
+ }
+}
+
+class Sub extends Base {
+ public function test($foo, array &$bar) {
+ }
+}
+?>
+--EXPECTF--
+Strict Standards: Declaration of Sub::test() should be compatible with Base::test($foo, array &$bar, $option = NULL, $extra = 3.1415926535898) in %sargument_restriction_002.php on line %d
diff --git a/Zend/tests/argument_restriction_003.phpt b/Zend/tests/argument_restriction_003.phpt
new file mode 100644
index 0000000000..393581fcfc
--- /dev/null
+++ b/Zend/tests/argument_restriction_003.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+class Foo {
+}
+
+Abstract Class Base {
+ public function test(Foo $foo, array $bar, $option = NULL, $extra = "lllllllllllllllllllllllllllllllllllllllllllllllllll") {
+ }
+}
+
+class Sub extends Base {
+ public function test() {
+ }
+}
+?>
+--EXPECTF--
+Strict Standards: Declaration of Sub::test() should be compatible with Base::test(Foo $foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_003.php on line %d
diff --git a/Zend/tests/argument_restriction_004.phpt b/Zend/tests/argument_restriction_004.phpt
new file mode 100644
index 0000000000..599b3e1604
--- /dev/null
+++ b/Zend/tests/argument_restriction_004.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+class Foo {
+}
+
+Abstract Class Base {
+ abstract public function test(Foo $foo, array $bar, $option = NULL, $extra = 16777215) ;
+}
+
+class Sub extends Base {
+ public function test(Foo $foo, array $bar, $option = NULL, $extra = 0xffffff ) {
+ }
+}
+?>
+--EXPECTF--
diff --git a/Zend/tests/argument_restriction_005.phpt b/Zend/tests/argument_restriction_005.phpt
new file mode 100644
index 0000000000..2826fe6a81
--- /dev/null
+++ b/Zend/tests/argument_restriction_005.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+class Sub implements ArrayAccess {
+ public function offsetSet() {
+ }
+}
+?>
+--EXPECTF--
+Fatal error: Declaration of Sub::offsetSet() must be compatible with ArrayAccess::offsetSet($offset, $value) in %sargument_restriction_005.php on line %d
diff --git a/Zend/tests/bug47981.phpt b/Zend/tests/bug47981.phpt
index 2d68d3706f..c16ae0ffc8 100644
--- a/Zend/tests/bug47981.phpt
+++ b/Zend/tests/bug47981.phpt
@@ -14,6 +14,6 @@ class b implements a { function f($a=1) {}}
class c extends b {function f() {}}
?>
--EXPECTF--
-string(62) "Declaration of c::f() should be compatible with that of b::f()"
+string(60) "Declaration of c::f() should be compatible with b::f($a = 1)"
diff --git a/Zend/tests/bug51421.phpt b/Zend/tests/bug51421.phpt
index 825012a289..bc1758c300 100644
--- a/Zend/tests/bug51421.phpt
+++ b/Zend/tests/bug51421.phpt
@@ -15,4 +15,4 @@ class Test extends TestInterface {
?>
--EXPECTF--
-Fatal error: Declaration of Test::__construct() must be compatible with that of TestInterface::__construct() in %s on line %d
+Fatal error: Declaration of Test::__construct() must be compatible with TestInterface::__construct(ExampleClass $var) in %s on line %d
diff --git a/Zend/tests/objects_002.phpt b/Zend/tests/objects_002.phpt
index 87ba0fdc3b..e2db140b18 100644
--- a/Zend/tests/objects_002.phpt
+++ b/Zend/tests/objects_002.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo() in %s on line %d
Done
diff --git a/Zend/tests/objects_003.phpt b/Zend/tests/objects_003.phpt
index 1c254290f7..7e0f083267 100644
--- a/Zend/tests/objects_003.phpt
+++ b/Zend/tests/objects_003.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
Done
diff --git a/Zend/tests/objects_004.phpt b/Zend/tests/objects_004.phpt
index 35ab4775b1..eb04124474 100644
--- a/Zend/tests/objects_004.phpt
+++ b/Zend/tests/objects_004.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
Done
diff --git a/Zend/tests/objects_005.phpt b/Zend/tests/objects_005.phpt
index d583c9be90..908e797243 100644
--- a/Zend/tests/objects_005.phpt
+++ b/Zend/tests/objects_005.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with & test::foo() in %s on line %d
Done
diff --git a/Zend/tests/objects_006.phpt b/Zend/tests/objects_006.phpt
index fb2e28b3af..f84a3053e9 100644
--- a/Zend/tests/objects_006.phpt
+++ b/Zend/tests/objects_006.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg, $arg2 = NULL) in %s on line %d
Done
diff --git a/Zend/tests/objects_007.phpt b/Zend/tests/objects_007.phpt
index 2fce04a17d..75e0817589 100644
--- a/Zend/tests/objects_007.phpt
+++ b/Zend/tests/objects_007.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg, &$arg2 = NULL) in %s on line %d
Done
diff --git a/Zend/tests/objects_008.phpt b/Zend/tests/objects_008.phpt
index b61d16786c..f6d5826eb8 100644
--- a/Zend/tests/objects_008.phpt
+++ b/Zend/tests/objects_008.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
Done
diff --git a/Zend/tests/objects_009.phpt b/Zend/tests/objects_009.phpt
index 5fad0046a8..04b1118e09 100644
--- a/Zend/tests/objects_009.phpt
+++ b/Zend/tests/objects_009.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
Done
diff --git a/Zend/tests/traits/inheritance003.phpt b/Zend/tests/traits/inheritance003.phpt
index ba2e4da76d..b457a73fea 100644
--- a/Zend/tests/traits/inheritance003.phpt
+++ b/Zend/tests/traits/inheritance003.phpt
@@ -35,4 +35,4 @@ $o->sayHello(array());
--EXPECTF--
World!
-Fatal error: Declaration of MyHelloWorld::sayHello() must be compatible with that of Base::sayHello() in %s on line %d
+Fatal error: Declaration of MyHelloWorld::sayHello() must be compatible with Base::sayHello(array $a) in %s on line %d