Skip to content

Commit c455e1e

Browse files
committed
Tests: rename some test case files
... in anticipation of additional test case files for parse error being added.
1 parent b63cedf commit c455e1e

23 files changed

+508
-405
lines changed

src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,41 @@ final class ClassCommentUnitTest extends AbstractSniffTestCase
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 being tested.
30+
*
2931
* @return array<int, int>
3032
*/
31-
public function getErrorList()
33+
public function getErrorList($testFile='')
3234
{
33-
return [
34-
4 => 1,
35-
15 => 1,
36-
51 => 1,
37-
63 => 1,
38-
65 => 2,
39-
66 => 1,
40-
68 => 1,
41-
70 => 1,
42-
71 => 1,
43-
72 => 1,
44-
74 => 2,
45-
75 => 1,
46-
76 => 1,
47-
77 => 1,
48-
85 => 1,
49-
96 => 5,
50-
106 => 5,
51-
116 => 5,
52-
126 => 5,
53-
161 => 1,
54-
163 => 1,
55-
];
35+
switch ($testFile) {
36+
case 'ClassCommentUnitTest.1.inc':
37+
return [
38+
4 => 1,
39+
15 => 1,
40+
51 => 1,
41+
63 => 1,
42+
65 => 2,
43+
66 => 1,
44+
68 => 1,
45+
70 => 1,
46+
71 => 1,
47+
72 => 1,
48+
74 => 2,
49+
75 => 1,
50+
76 => 1,
51+
77 => 1,
52+
85 => 1,
53+
96 => 5,
54+
106 => 5,
55+
116 => 5,
56+
126 => 5,
57+
161 => 1,
58+
163 => 1,
59+
];
60+
61+
default:
62+
return [];
63+
}//end switch
5664

5765
}//end getErrorList()
5866

@@ -63,14 +71,22 @@ public function getErrorList()
6371
* The key of the array should represent the line number and the value
6472
* should represent the number of warnings that should occur on that line.
6573
*
74+
* @param string $testFile The name of the test file being tested.
75+
*
6676
* @return array<int, int>
6777
*/
68-
public function getWarningList()
78+
public function getWarningList($testFile='')
6979
{
70-
return [
71-
71 => 1,
72-
73 => 1,
73-
];
80+
switch ($testFile) {
81+
case 'ClassCommentUnitTest.1.inc':
82+
return [
83+
71 => 1,
84+
73 => 1,
85+
];
86+
87+
default:
88+
return [];
89+
}//end switch
7490

7591
}//end getWarningList()
7692

src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php

Lines changed: 65 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -26,66 +26,74 @@ final class FunctionCommentUnitTest extends AbstractSniffTestCase
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 being tested.
30+
*
2931
* @return array<int, int>
3032
*/
31-
public function getErrorList()
33+
public function getErrorList($testFile='')
3234
{
33-
return [
34-
5 => 1,
35-
10 => 1,
36-
12 => 1,
37-
13 => 1,
38-
14 => 1,
39-
15 => 1,
40-
28 => 1,
41-
76 => 1,
42-
87 => 1,
43-
103 => 1,
44-
109 => 1,
45-
112 => 1,
46-
122 => 1,
47-
123 => 2,
48-
124 => 2,
49-
125 => 1,
50-
126 => 1,
51-
137 => 1,
52-
138 => 1,
53-
139 => 1,
54-
152 => 1,
55-
155 => 1,
56-
165 => 1,
57-
172 => 1,
58-
183 => 1,
59-
190 => 2,
60-
206 => 1,
61-
234 => 1,
62-
272 => 1,
63-
313 => 1,
64-
317 => 1,
65-
327 => 1,
66-
329 => 1,
67-
332 => 1,
68-
344 => 1,
69-
343 => 1,
70-
345 => 1,
71-
346 => 1,
72-
360 => 1,
73-
361 => 1,
74-
363 => 1,
75-
364 => 1,
76-
406 => 1,
77-
417 => 1,
78-
456 => 1,
79-
466 => 1,
80-
474 => 1,
81-
476 => 1,
82-
486 => 1,
83-
502 => 1,
84-
521 => 1,
85-
523 => 1,
86-
533 => 1,
87-
545 => 1,
88-
];
35+
switch ($testFile) {
36+
case 'FunctionCommentUnitTest.1.inc':
37+
return [
38+
5 => 1,
39+
10 => 1,
40+
12 => 1,
41+
13 => 1,
42+
14 => 1,
43+
15 => 1,
44+
28 => 1,
45+
76 => 1,
46+
87 => 1,
47+
103 => 1,
48+
109 => 1,
49+
112 => 1,
50+
122 => 1,
51+
123 => 2,
52+
124 => 2,
53+
125 => 1,
54+
126 => 1,
55+
137 => 1,
56+
138 => 1,
57+
139 => 1,
58+
152 => 1,
59+
155 => 1,
60+
165 => 1,
61+
172 => 1,
62+
183 => 1,
63+
190 => 2,
64+
206 => 1,
65+
234 => 1,
66+
272 => 1,
67+
313 => 1,
68+
317 => 1,
69+
327 => 1,
70+
329 => 1,
71+
332 => 1,
72+
344 => 1,
73+
343 => 1,
74+
345 => 1,
75+
346 => 1,
76+
360 => 1,
77+
361 => 1,
78+
363 => 1,
79+
364 => 1,
80+
406 => 1,
81+
417 => 1,
82+
456 => 1,
83+
466 => 1,
84+
474 => 1,
85+
476 => 1,
86+
486 => 1,
87+
502 => 1,
88+
521 => 1,
89+
523 => 1,
90+
533 => 1,
91+
545 => 1,
92+
];
93+
94+
default:
95+
return [];
96+
}//end switch
8997

9098
}//end getErrorList()
9199

0 commit comments

Comments
 (0)