Skip to content

Commit ceb8396

Browse files
committed
fix tests for overriding static with self in non-final classes
1 parent f2a4a2d commit ceb8396

4 files changed

+7
-7
lines changed

Zend/tests/type_declarations/override_static_type_with_self_in_final_class.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var_dump($bar->method1());
7070
var_dump($bar->method2());
7171
var_dump($bar->method3());
7272
?>
73-
--EXPECT--
73+
--EXPECTF--
7474
object(Foo)#1 (0) {
7575
}
7676
object(Foo)#1 (0) {

Zend/tests/type_declarations/override_static_type_with_self_in_non_final_class_with_abstract_class.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ $foo = new Foo();
2020

2121
var_dump($foo->method2());
2222
?>
23-
--EXPECT--
24-
Fatal error: Declaration of Foo::method2(): Foo must be compatible with B::method2(): static in src/Zend/tests/type_declarations/override_static_type_with_self_in_non_final_class_with_abstract_class.php on line 10
23+
--EXPECTF--
24+
Fatal error: Declaration of Foo::method2(): Foo must be compatible with B::method2(): static in %s on line %d

Zend/tests/type_declarations/override_static_type_with_self_in_non_final_class_with_interface.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ $foo = new Foo();
2020

2121
var_dump($foo->method1());
2222
?>
23-
--EXPECT--
24-
Fatal error: Declaration of Foo::method1(): Foo must be compatible with A::method1(): static in src/Zend/tests/type_declarations/override_static_type_with_self_in_non_final_class_with_interface.php on line 10
23+
--EXPECTF--
24+
Fatal error: Declaration of Foo::method1(): Foo must be compatible with A::method1(): static in %s on line %d

Zend/tests/type_declarations/override_static_type_with_self_in_non_final_class_with_trait.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ $foo = new Foo();
2222

2323
var_dump($foo->method3());
2424
?>
25-
--EXPECT--
26-
Fatal error: Declaration of Foo::method3(): Foo must be compatible with C::method3(): static in src/Zend/tests/type_declarations/override_static_type_with_self_in_non_final_class_with_trait.php on line 12
25+
--EXPECTF--
26+
Fatal error: Declaration of Foo::method3(): Foo must be compatible with C::method3(): static in %s on line %d

0 commit comments

Comments
 (0)