Skip to content

Commit 4c9d9d0

Browse files
committed
Tests
1 parent f103e84 commit 4c9d9d0

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
#[\Override]: Static method no parent class.
3+
--FILE--
4+
<?php
5+
6+
class C
7+
{
8+
#[\Override]
9+
public static function c(): void {}
10+
}
11+
12+
echo "Done";
13+
14+
?>
15+
--EXPECTF--
16+
Fatal error: C::c() has #[\Override] attribute, but no matching parent method exists in %s on line %d
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
#[\Override]: Static method.
3+
--FILE--
4+
<?php
5+
6+
class P {
7+
public static function p(): void {}
8+
}
9+
10+
class C extends P {
11+
#[\Override]
12+
public static function p(): void {}
13+
}
14+
15+
echo "Done";
16+
17+
?>
18+
--EXPECT--
19+
Done

0 commit comments

Comments
 (0)