Skip to content

Commit 7ae6441

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/UnusedFunctionParameter: rename test case file
To add more tests with syntax errors in separate files in subsequent commits.
1 parent 17a4c19 commit 7ae6441

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

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

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,35 @@ 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 file being tested.
45+
*
4446
* @return array<int, int>
4547
*/
46-
public function getWarningList()
48+
public function getWarningList($testFile='')
4749
{
48-
return [
49-
3 => 1,
50-
7 => 1,
51-
78 => 1,
52-
94 => 1,
53-
100 => 1,
54-
106 => 1,
55-
117 => 1,
56-
121 => 2,
57-
125 => 2,
58-
163 => 1,
59-
172 => 1,
60-
228 => 2,
61-
232 => 2,
62-
244 => 2,
63-
248 => 2,
64-
];
50+
switch ($testFile) {
51+
case 'UnusedFunctionParameterUnitTest.1.inc':
52+
return [
53+
3 => 1,
54+
7 => 1,
55+
78 => 1,
56+
94 => 1,
57+
100 => 1,
58+
106 => 1,
59+
117 => 1,
60+
121 => 2,
61+
125 => 2,
62+
163 => 1,
63+
172 => 1,
64+
228 => 2,
65+
232 => 2,
66+
244 => 2,
67+
248 => 2,
68+
];
69+
70+
default:
71+
return [];
72+
}//end switch
6573

6674
}//end getWarningList()
6775

0 commit comments

Comments
 (0)