Skip to content

Commit 40daeca

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/AbstractClassNamePrefix: rename test case file
Doing this to be able to create tests with syntax errors in additional, separate test case files.
1 parent 3ba1aff commit 40daeca

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

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

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,24 @@ final class AbstractClassNamePrefixUnitTest extends AbstractSniffUnitTest
2525
* The key of the array should represent the line number and the value
2626
* should represent the number of errors that should occur on that line.
2727
*
28+
* @param string $testFile The name of the test file.
29+
*
2830
* @return array<int, int>
2931
*/
30-
public function getErrorList()
32+
public function getErrorList($testFile='')
3133
{
32-
return [
33-
3 => 1,
34-
13 => 1,
35-
18 => 1,
36-
23 => 1,
37-
42 => 1,
38-
];
34+
switch ($testFile) {
35+
case 'AbstractClassNamePrefixUnitTest.1.inc':
36+
return [
37+
3 => 1,
38+
13 => 1,
39+
18 => 1,
40+
23 => 1,
41+
42 => 1,
42+
];
43+
default:
44+
return [];
45+
}
3946

4047
}//end getErrorList()
4148

0 commit comments

Comments
 (0)