Skip to content

Commit 4287c8c

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/UnnecessaryFinalModifier: rename test case file
Doing this to be able to create a test with a syntax error on a separate file.
1 parent 2ea8bd5 commit 4287c8c

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.php

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,25 @@ public function getErrorList()
4141
* The key of the array should represent the line number and the value
4242
* should represent the number of warnings that should occur on that line.
4343
*
44+
* @param string $testFile The name of the test file being tested.
45+
*
4446
* @return array<int, int>
4547
*/
46-
public function getWarningList()
48+
public function getWarningList($testFile='')
4749
{
48-
return [
49-
11 => 1,
50-
12 => 1,
51-
15 => 1,
52-
18 => 1,
53-
32 => 1,
54-
33 => 1,
55-
];
50+
switch ($testFile) {
51+
case 'UnnecessaryFinalModifierUnitTest.1.inc':
52+
return [
53+
11 => 1,
54+
12 => 1,
55+
15 => 1,
56+
18 => 1,
57+
32 => 1,
58+
33 => 1,
59+
];
60+
default:
61+
return [];
62+
}
5663

5764
}//end getWarningList()
5865

0 commit comments

Comments
 (0)