Skip to content

Commit bd6957b

Browse files
committed
Squiz/CSS/ShorthandSize: rename test case file to allow for adding more
1 parent 27678e7 commit bd6957b

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.php

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,30 @@ final class ShorthandSizeUnitTest 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-
8 => 1,
35-
9 => 1,
36-
10 => 1,
37-
11 => 1,
38-
12 => 1,
39-
13 => 1,
40-
15 => 1,
41-
16 => 1,
42-
17 => 1,
43-
21 => 1,
44-
];
35+
switch ($testFile) {
36+
case 'ShorthandSizeUnitTest.1.css':
37+
return [
38+
8 => 1,
39+
9 => 1,
40+
10 => 1,
41+
11 => 1,
42+
12 => 1,
43+
13 => 1,
44+
15 => 1,
45+
16 => 1,
46+
17 => 1,
47+
21 => 1,
48+
];
49+
50+
default:
51+
return [];
52+
}//end switch
4553

4654
}//end getErrorList()
4755

0 commit comments

Comments
 (0)