Skip to content

Commit a7ece48

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/CallTimePassByReference: rename test case file
Doing this to be able to create tests with syntax errors on separate files.
1 parent 271a13a commit a7ece48

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

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

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,26 @@ final class CallTimePassByReferenceUnitTest 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='CallTimePassByReferenceUnitTest.1.inc')
3234
{
33-
return [
34-
9 => 1,
35-
12 => 1,
36-
15 => 1,
37-
18 => 2,
38-
23 => 1,
39-
30 => 1,
40-
];
35+
switch ($testFile) {
36+
case 'CallTimePassByReferenceUnitTest.1.inc':
37+
return [
38+
9 => 1,
39+
12 => 1,
40+
15 => 1,
41+
18 => 2,
42+
23 => 1,
43+
30 => 1,
44+
];
45+
46+
default:
47+
return [];
48+
}
4149

4250
}//end getErrorList()
4351

0 commit comments

Comments
 (0)