diff options
Diffstat (limited to 'Zend/tests/type_declarations/parameter_type_variance.phpt')
-rw-r--r-- | Zend/tests/type_declarations/parameter_type_variance.phpt | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Zend/tests/type_declarations/parameter_type_variance.phpt b/Zend/tests/type_declarations/parameter_type_variance.phpt index 61915a2e6c..e4e5400957 100644 --- a/Zend/tests/type_declarations/parameter_type_variance.phpt +++ b/Zend/tests/type_declarations/parameter_type_variance.phpt @@ -1,5 +1,5 @@ --TEST-- -Parameter variance with no type +Parameter variance with no type (class) --FILE-- <?php @@ -8,11 +8,6 @@ class Foo { function testBothClass(Foo $foo) {} function testChildClass($foo) {} function testNoneClass($foo) {} - - function testParentBuiltin(int $foo) {} - function testBothBuiltin(int $foo) {} - function testChildBuiltin($foo) {} - function testNoneBuiltin($foo) {} } class Bar extends Foo { @@ -20,15 +15,8 @@ class Bar extends Foo { function testBothClass(Foo $foo) {} function testChildClass(Foo $foo) {} function testNoneClass($foo) {} - - function testParentBuiltin($foo) {} - function testBothBuiltin(int $foo) {} - function testChildBuiltin(int $foo) {} - function testNoneBuiltin($foo) {} } ?> --EXPECTF-- -Warning: Declaration of Bar::testChildClass(Foo $foo) should be compatible with Foo::testChildClass($foo) in %s on line %d - -Warning: Declaration of Bar::testChildBuiltin(int $foo) should be compatible with Foo::testChildBuiltin($foo) in %s on line %d +Fatal error: Declaration of Bar::testChildClass(Foo $foo) must be compatible with Foo::testChildClass($foo) in %s on line %d |