Skip to content

Commit 17b9164

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/UpperCaseConstantName: rename test case file
Doing this to be able to create tests with syntax errors on separate files.
1 parent d129e9b commit 17b9164

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.php

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,30 @@ final class UpperCaseConstantNameUnitTest extends AbstractSniffUnitTest
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-
8 => 1,
35-
10 => 1,
36-
12 => 1,
37-
14 => 1,
38-
19 => 1,
39-
28 => 1,
40-
30 => 1,
41-
40 => 1,
42-
41 => 1,
43-
45 => 1,
44-
51 => 1,
45-
];
35+
switch ($testFile) {
36+
case 'UpperCaseConstantNameUnitTest.1.inc':
37+
return [
38+
8 => 1,
39+
10 => 1,
40+
12 => 1,
41+
14 => 1,
42+
19 => 1,
43+
28 => 1,
44+
30 => 1,
45+
40 => 1,
46+
41 => 1,
47+
45 => 1,
48+
51 => 1,
49+
];
50+
default:
51+
return [];
52+
}
4653

4754
}//end getErrorList()
4855

0 commit comments

Comments
 (0)