Skip to content

Commit d55b222

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/DocComment: rename test case files
Doing this to be able to move a test that needs to be on the last line to a separate file.
1 parent 37ce21b commit d55b222

File tree

5 files changed

+59
-50
lines changed

5 files changed

+59
-50
lines changed

src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.php

Lines changed: 59 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -41,59 +41,68 @@ public function setCliValues($testFile, $config)
4141
* The key of the array should represent the line number and the value
4242
* should represent the number of errors that should occur on that line.
4343
*
44+
* @param string $testFile The name of the file being tested.
45+
*
4446
* @return array(int => int)
4547
*/
46-
public function getErrorList()
48+
public function getErrorList($testFile='')
4749
{
48-
return [
49-
14 => 1,
50-
16 => 1,
51-
18 => 1,
52-
23 => 1,
53-
26 => 1,
54-
30 => 1,
55-
32 => 1,
56-
38 => 2,
57-
40 => 1,
58-
41 => 1,
59-
51 => 1,
60-
54 => 1,
61-
58 => 1,
62-
60 => 2,
63-
67 => 1,
64-
69 => 2,
65-
80 => 1,
66-
81 => 2,
67-
88 => 1,
68-
91 => 1,
69-
95 => 1,
70-
156 => 1,
71-
158 => 1,
72-
170 => 3,
73-
171 => 3,
74-
179 => 1,
75-
183 => 1,
76-
184 => 2,
77-
185 => 1,
78-
186 => 1,
79-
187 => 2,
80-
193 => 1,
81-
196 => 1,
82-
199 => 1,
83-
203 => 1,
84-
206 => 1,
85-
211 => 1,
86-
214 => 4,
87-
218 => 1,
88-
220 => 2,
89-
222 => 1,
90-
224 => 3,
91-
243 => 1,
92-
244 => 1,
93-
246 => 1,
94-
248 => 1,
95-
249 => 1,
96-
];
50+
switch ($testFile) {
51+
case 'DocCommentUnitTest.1.inc':
52+
case 'DocCommentUnitTest.1.js':
53+
return [
54+
14 => 1,
55+
16 => 1,
56+
18 => 1,
57+
23 => 1,
58+
26 => 1,
59+
30 => 1,
60+
32 => 1,
61+
38 => 2,
62+
40 => 1,
63+
41 => 1,
64+
51 => 1,
65+
54 => 1,
66+
58 => 1,
67+
60 => 2,
68+
67 => 1,
69+
69 => 2,
70+
80 => 1,
71+
81 => 2,
72+
88 => 1,
73+
91 => 1,
74+
95 => 1,
75+
156 => 1,
76+
158 => 1,
77+
170 => 3,
78+
171 => 3,
79+
179 => 1,
80+
183 => 1,
81+
184 => 2,
82+
185 => 1,
83+
186 => 1,
84+
187 => 2,
85+
193 => 1,
86+
196 => 1,
87+
199 => 1,
88+
203 => 1,
89+
206 => 1,
90+
211 => 1,
91+
214 => 4,
92+
218 => 1,
93+
220 => 2,
94+
222 => 1,
95+
224 => 3,
96+
243 => 1,
97+
244 => 1,
98+
246 => 1,
99+
248 => 1,
100+
249 => 1,
101+
];
102+
103+
default:
104+
return [];
105+
}//end switch
97106

98107
}//end getErrorList()
99108

0 commit comments

Comments
 (0)