Skip to content

Commit 2212c72

Browse files
committed
PSR12/ImportStatement: test tweak
Looking at the tests, each type of import `use` should have at least one test with a leading namespace separator and one without to properly cover what the sniff is looking for. Looks like adding the leading `\` was missed for the `use const` tests.
1 parent ecc1b60 commit 2212c72

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use function Vendor\Package\{functionA, functionB, functionC};
77
use FUNCTION \Another\Vendor\functionD;
88

99
use CONST Vendor\Package\{CONSTANT_A, CONSTANT_B, CONSTANT_C};
10-
use const Another\Vendor\CONSTANT_D;
10+
use const \Another\Vendor\CONSTANT_D;
1111

1212
class ClassName3
1313
{

src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ final class ImportStatementUnitTest extends AbstractSniffUnitTest
3131
public function getErrorList()
3232
{
3333
return [
34-
2 => 1,
35-
4 => 1,
36-
7 => 1,
34+
2 => 1,
35+
4 => 1,
36+
7 => 1,
37+
10 => 1,
3738
];
3839

3940
}//end getErrorList()

0 commit comments

Comments
 (0)