Skip to content

Commit 24ef1dc

Browse files
Fix
1 parent b2166bd commit 24ef1dc

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/PHPStan/Rules/Classes/EnumSanityRuleTest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,29 @@ public function testBug9402(): void
118118
]);
119119
}
120120

121+
#[RequiresPhp('>= 8.1')]
122+
public function testBug11592(): void
123+
{
124+
$this->analyse([__DIR__ . '/data/bug-11592.php'], [
125+
[
126+
'Enum Bug11592\Test2 cannot redeclare native method cases().',
127+
22,
128+
],
129+
[
130+
'Enum Bug11592\BackedTest2 cannot redeclare native method cases().',
131+
37,
132+
],
133+
[
134+
'Enum Bug11592\BackedTest2 cannot redeclare native method from().',
135+
39,
136+
],
137+
[
138+
'Enum Bug11592\BackedTest2 cannot redeclare native method tryFrom().',
139+
41,
140+
],
141+
]);
142+
}
143+
121144
#[RequiresPhp('>= 8.1')]
122145
public function testBug13768(): void
123146
{

0 commit comments

Comments
 (0)