]> granicus.if.org Git - php/commitdiff
- Add new tests
authorMarcus Boerger <helly@php.net>
Tue, 30 May 2006 23:11:13 +0000 (23:11 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 30 May 2006 23:11:13 +0000 (23:11 +0000)
tests/classes/inheritance_003.phpt [new file with mode: 0755]
tests/classes/inheritance_004.phpt [new file with mode: 0755]

diff --git a/tests/classes/inheritance_003.phpt b/tests/classes/inheritance_003.phpt
new file mode 100755 (executable)
index 0000000..14ff1be
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+ZE2 method inheritance without interfaces
+--FILE--
+<?php
+
+class A
+{
+       function f($x) {}
+}
+
+class B extends A
+{
+       function f() {}
+}
+
+?>
+===DONE===
+--EXPECTF--
+
+Fatal error: Declaration of B::f() must be compatible with that of A::f() in %sinheritance_003.php on line %d
diff --git a/tests/classes/inheritance_004.phpt b/tests/classes/inheritance_004.phpt
new file mode 100755 (executable)
index 0000000..1dc5fa0
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+ZE2 method inheritance without interfaces
+--FILE--
+<?php
+
+class A
+{
+       function f() {}
+}
+
+class B extends A
+{
+       function f($x) {}
+}
+
+?>
+===DONE===
+--EXPECTF--
+
+Fatal error: Declaration of B::f() must be compatible with that of A::f() in %sinheritance_004.php on line %d