Skip to content

Commit a791025

Browse files
committed
Generic/SpreadOperatorSpacingAfter: rename unit test case file to allow for adding more
1 parent 27678e7 commit a791025

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.php

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,29 @@ final class SpreadOperatorSpacingAfterUnitTest 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 file being tested.
30+
*
2931
* @return array<int, int>
3032
*/
31-
public function getErrorList()
33+
public function getErrorList($testFile='')
3234
{
33-
return [
34-
12 => 1,
35-
13 => 1,
36-
20 => 2,
37-
40 => 1,
38-
41 => 1,
39-
46 => 2,
40-
60 => 1,
41-
61 => 1,
42-
66 => 2,
43-
];
35+
switch ($testFile) {
36+
case 'SpreadOperatorSpacingAfterUnitTest.1.inc':
37+
return [
38+
12 => 1,
39+
13 => 1,
40+
20 => 2,
41+
40 => 1,
42+
41 => 1,
43+
46 => 2,
44+
60 => 1,
45+
61 => 1,
46+
66 => 2,
47+
];
48+
49+
default:
50+
return [];
51+
}//end switch
4452

4553
}//end getErrorList()
4654

0 commit comments

Comments
 (0)