Skip to content

Commit 6b7bea2

Browse files
rodrigoprimojrfnl
authored andcommitted
Squiz/ClosingDeclarationComment: rename test case file
This is necessary to add more tests that need to go into separate files.
1 parent 8a2b6b1 commit 6b7bea2

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,29 @@ final class ClosingDeclarationCommentUnitTest 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 being tested.
30+
*
2931
* @return array<int, int>
3032
*/
31-
public function getErrorList()
33+
public function getErrorList($testFile='')
3234
{
33-
return [
34-
13 => 1,
35-
17 => 1,
36-
31 => 1,
37-
41 => 1,
38-
59 => 1,
39-
63 => 1,
40-
67 => 1,
41-
79 => 1,
42-
83 => 1,
43-
];
35+
switch ($testFile) {
36+
case 'ClosingDeclarationCommentUnitTest.1.inc':
37+
return [
38+
13 => 1,
39+
17 => 1,
40+
31 => 1,
41+
41 => 1,
42+
59 => 1,
43+
63 => 1,
44+
67 => 1,
45+
79 => 1,
46+
83 => 1,
47+
];
48+
49+
default:
50+
return [];
51+
}
4452

4553
}//end getErrorList()
4654

@@ -51,11 +59,19 @@ public function getErrorList()
5159
* The key of the array should represent the line number and the value
5260
* should represent the number of warnings that should occur on that line.
5361
*
62+
* @param string $testFile The name of the test file being tested.
63+
*
5464
* @return array<int, int>
5565
*/
56-
public function getWarningList()
66+
public function getWarningList($testFile='')
5767
{
58-
return [71 => 1];
68+
switch ($testFile) {
69+
case 'ClosingDeclarationCommentUnitTest.1.inc':
70+
return [71 => 1];
71+
72+
default:
73+
return [];
74+
}
5975

6076
}//end getWarningList()
6177

0 commit comments

Comments
 (0)