Skip to content

Commit 111d851

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/OpeningFunctionBraceKernighanRichie: rename test case file
Doing this to be able to create tests with syntax errors on separate files.
1 parent a375eea commit 111d851

File tree

3 files changed

+38
-31
lines changed

3 files changed

+38
-31
lines changed

src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.php

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,47 @@ final class OpeningFunctionBraceKernighanRitchieUnitTest extends AbstractSniffUn
2626
* The key of the array should represent the line number and the value
2727
* should represent the number of errors that should occur on that line.
2828
*
29+
* @param string $testFile The name of the test file to process.
30+
*
2931
* @return array<int, int>
3032
*/
31-
public function getErrorList()
33+
public function getErrorList($testFile='')
3234
{
33-
return [
34-
9 => 1,
35-
13 => 1,
36-
17 => 1,
37-
29 => 1,
38-
33 => 1,
39-
37 => 1,
40-
53 => 1,
41-
58 => 1,
42-
63 => 1,
43-
77 => 1,
44-
82 => 1,
45-
87 => 1,
46-
104 => 1,
47-
119 => 1,
48-
123 => 1,
49-
127 => 1,
50-
132 => 1,
51-
137 => 1,
52-
142 => 1,
53-
157 => 1,
54-
162 => 1,
55-
171 => 1,
56-
181 => 1,
57-
191 => 1,
58-
197 => 1,
59-
203 => 1,
60-
213 => 1,
61-
214 => 1,
62-
];
35+
switch ($testFile) {
36+
case 'OpeningFunctionBraceKernighanRitchieUnitTest.1.inc':
37+
return [
38+
9 => 1,
39+
13 => 1,
40+
17 => 1,
41+
29 => 1,
42+
33 => 1,
43+
37 => 1,
44+
53 => 1,
45+
58 => 1,
46+
63 => 1,
47+
77 => 1,
48+
82 => 1,
49+
87 => 1,
50+
104 => 1,
51+
119 => 1,
52+
123 => 1,
53+
127 => 1,
54+
132 => 1,
55+
137 => 1,
56+
142 => 1,
57+
157 => 1,
58+
162 => 1,
59+
171 => 1,
60+
181 => 1,
61+
191 => 1,
62+
197 => 1,
63+
203 => 1,
64+
213 => 1,
65+
214 => 1,
66+
];
67+
default:
68+
return [];
69+
}//end switch
6370

6471
}//end getErrorList()
6572

0 commit comments

Comments
 (0)