Skip to content

Commit 024c47d

Browse files
jrfnlkukulich
authored andcommitted
Generic/DuplicateClassName: improve enum tests
* Test case file 1 should contain both a duplicate and a non-duplicate enum. * Test case file 2 should contain an enum which was already declared in file 1 to verify cross-file detection.
1 parent fc2c525 commit 024c47d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.1.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ class YourClass {}
44
interface MyInterface {}
55
interface YourInterface {}
66
trait MyTrait {}
7-
enum MyEnum {}
87
trait YourTrait {}
8+
enum MyEnum {}
9+
enum YourEnum {}
910
class MyClass {}
1011
interface MyInterface {}
1112
trait MyTrait {}

src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.2.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
class MyClass {}
33
interface MyInterface {}
44
trait MyTrait {}
5+
enum MyEnum {}
56
?>

src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,18 @@ public function getWarningList($testFile='')
4545
switch ($testFile) {
4646
case 'DuplicateClassNameUnitTest.1.inc':
4747
return [
48-
9 => 1,
4948
10 => 1,
5049
11 => 1,
5150
12 => 1,
51+
13 => 1,
5252
];
5353
break;
5454
case 'DuplicateClassNameUnitTest.2.inc':
5555
return [
5656
2 => 1,
5757
3 => 1,
5858
4 => 1,
59+
5 => 1,
5960
];
6061
break;
6162
case 'DuplicateClassNameUnitTest.5.inc':

0 commit comments

Comments
 (0)