Skip to content

Commit 0b8002b

Browse files
committed
Squiz/DisallowMultipleAssignments: rename test case file
Doing this to be able to create a test with a syntax error on separate file.
1 parent 131886e commit 0b8002b

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,29 @@ final class DisallowMultipleAssignmentsUnitTest 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-
4 => 1,
35-
5 => 2,
36-
7 => 1,
37-
9 => 1,
38-
12 => 1,
39-
14 => 1,
40-
15 => 1,
41-
79 => 1,
42-
85 => 1,
43-
];
35+
switch ($testFile) {
36+
case 'DisallowMultipleAssignmentsUnitTest.1.inc':
37+
return [
38+
4 => 1,
39+
5 => 2,
40+
7 => 1,
41+
9 => 1,
42+
12 => 1,
43+
14 => 1,
44+
15 => 1,
45+
79 => 1,
46+
85 => 1,
47+
];
48+
49+
default:
50+
return [];
51+
}
4452

4553
}//end getErrorList()
4654

0 commit comments

Comments
 (0)