Skip to content

Commit 8b4c9f6

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/UselessOverridingMethod: rename test case file
To add more tests with syntax errors in separate files in subsequent commits.
1 parent 1d256d1 commit 8b4c9f6

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.inc renamed to src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.1.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ class Bar {
2222
public function export($a, $b = null) {
2323
return parent::export($a);
2424
}
25-
}
25+
}

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,21 @@ 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-
4 => 1,
50-
16 => 1,
51-
];
50+
switch ($testFile) {
51+
case 'UselessOverridingMethodUnitTest.1.inc':
52+
return [
53+
4 => 1,
54+
16 => 1,
55+
];
56+
default:
57+
return [];
58+
}
5259

5360
}//end getWarningList()
5461

0 commit comments

Comments
 (0)