Skip to content

Commit 498ecda

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/EmptyPHPStatement: rename test case file
Doing this to be able to create another test file to test the sniff with the short open tag.
1 parent ab4bae2 commit 498ecda

File tree

3 files changed

+29
-22
lines changed

3 files changed

+29
-22
lines changed

src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.php

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,38 @@ public function getErrorList()
4141
* The key of the array should represent the line number and the value
4242
* should represent the number of warnings 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 getWarningList()
48+
public function getWarningList($testFile='')
4749
{
48-
return [
49-
9 => 1,
50-
12 => 1,
51-
15 => 1,
52-
18 => 1,
53-
21 => 1,
54-
22 => 1,
55-
31 => 1,
56-
33 => 1,
57-
43 => 1,
58-
45 => 1,
59-
49 => 1,
60-
50 => 1,
61-
57 => 1,
62-
59 => 1,
63-
61 => 1,
64-
63 => 2,
65-
71 => 1,
66-
72 => 1,
67-
80 => 1,
68-
];
50+
switch ($testFile) {
51+
case 'EmptyPHPStatementUnitTest.1.inc':
52+
return [
53+
9 => 1,
54+
12 => 1,
55+
15 => 1,
56+
18 => 1,
57+
21 => 1,
58+
22 => 1,
59+
31 => 1,
60+
33 => 1,
61+
43 => 1,
62+
45 => 1,
63+
49 => 1,
64+
50 => 1,
65+
57 => 1,
66+
59 => 1,
67+
61 => 1,
68+
63 => 2,
69+
71 => 1,
70+
72 => 1,
71+
80 => 1,
72+
];
73+
default:
74+
return [];
75+
}//end switch
6976

7077
}//end getWarningList()
7178

0 commit comments

Comments
 (0)