Skip to content

Commit 3d6c0cd

Browse files
committed
PEAR/ValidDefaultValue: rename test case file to allow for adding more
1 parent 071344b commit 3d6c0cd

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,31 @@ final class ValidDefaultValueUnitTest 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-
29 => 1,
35-
34 => 1,
36-
39 => 1,
37-
71 => 1,
38-
76 => 1,
39-
81 => 1,
40-
91 => 1,
41-
99 => 1,
42-
101 => 1,
43-
106 => 1,
44-
114 => 1,
45-
];
35+
switch ($testFile) {
36+
case 'ValidDefaultValueUnitTest.1.inc':
37+
return [
38+
29 => 1,
39+
34 => 1,
40+
39 => 1,
41+
71 => 1,
42+
76 => 1,
43+
81 => 1,
44+
91 => 1,
45+
99 => 1,
46+
101 => 1,
47+
106 => 1,
48+
114 => 1,
49+
];
50+
51+
default:
52+
return [];
53+
}
4654

4755
}//end getErrorList()
4856

0 commit comments

Comments
 (0)