Skip to content

Commit 7e550f4

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/FunctionCallArgumentSpacing: rename test case file
Doing this to be able to create tests with syntax errors on separate files
1 parent 870843b commit 7e550f4

File tree

3 files changed

+41
-33
lines changed

3 files changed

+41
-33
lines changed

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

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,42 +26,50 @@ final class FunctionCallArgumentSpacingUnitTest 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-
5 => 1,
35-
6 => 1,
36-
7 => 2,
37-
8 => 1,
38-
11 => 1,
39-
12 => 1,
40-
13 => 1,
41-
42 => 3,
42-
43 => 3,
43-
45 => 1,
44-
46 => 2,
45-
79 => 1,
46-
82 => 1,
47-
93 => 1,
48-
105 => 1,
49-
107 => 1,
50-
108 => 2,
51-
114 => 1,
52-
115 => 1,
53-
119 => 1,
54-
125 => 2,
55-
130 => 2,
56-
131 => 1,
57-
132 => 2,
58-
133 => 2,
59-
134 => 1,
60-
154 => 2,
61-
155 => 1,
62-
162 => 2,
63-
170 => 1,
64-
];
35+
switch ($testFile) {
36+
case 'FunctionCallArgumentSpacingUnitTest.1.inc':
37+
return [
38+
5 => 1,
39+
6 => 1,
40+
7 => 2,
41+
8 => 1,
42+
11 => 1,
43+
12 => 1,
44+
13 => 1,
45+
42 => 3,
46+
43 => 3,
47+
45 => 1,
48+
46 => 2,
49+
79 => 1,
50+
82 => 1,
51+
93 => 1,
52+
105 => 1,
53+
107 => 1,
54+
108 => 2,
55+
114 => 1,
56+
115 => 1,
57+
119 => 1,
58+
125 => 2,
59+
130 => 2,
60+
131 => 1,
61+
132 => 2,
62+
133 => 2,
63+
134 => 1,
64+
154 => 2,
65+
155 => 1,
66+
162 => 2,
67+
170 => 1,
68+
];
69+
70+
default:
71+
return [];
72+
}//end switch
6573

6674
}//end getErrorList()
6775

0 commit comments

Comments
 (0)