Skip to content

Commit

Permalink
Fix: Add test case for anonymous class
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 6, 2025
1 parent 656ac46 commit 8a20466
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/Integration/Methods/PrivateInFinalClassRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public static function provideCasesWhereAnalysisShouldSucceed(): iterable
public static function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'anonymous-class-with-protected-method' => [
__DIR__ . '/../../Fixture/Methods/PrivateInFinalClassRule/Failure/AnonymousClassWithProtectedMethod.php',
[
'Method method() in anonymous class is protected, but since the containing class is final, it can be private.',
8,
],
],
'final-class-with-protected-method' => [
__DIR__ . '/../../Fixture/Methods/PrivateInFinalClassRule/Failure/FinalClassWithProtectedMethod.php',
[
Expand Down

0 comments on commit 8a20466

Please sign in to comment.