Skip to content

Commit 232ef22

Browse files
jirastomondrejmirtes
authored andcommitted
Failure test for error "Case of reference name join and use statement Join do not match (SlevomatCodingStandard.Namespaces.UnusedUses.MismatchingCaseSensitivity)"
1 parent ef4c333 commit 232ef22

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

tests/Sniffs/Namespaces/UnusedUsesSniffTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,10 @@ public function testMatchingCaseOfUseAndClassConstant()
122122
$this->assertNoSniffErrorInFile($report);
123123
}
124124

125+
public function testMatchingCaseOfUseAndPhpFunction()
126+
{
127+
$report = $this->checkFile(__DIR__ . '/data/matchingCaseOfUseAndPhpFunction.php');
128+
$this->assertNoSniffErrorInFile($report);
129+
}
130+
125131
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Doctrine\ORM\Query\Expr;
4+
5+
class Join
6+
{
7+
8+
public static function foo()
9+
{
10+
11+
}
12+
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php declare(strict_types = 1);
2+
3+
use Doctrine\ORM\Query\Expr\Join;
4+
5+
class TestJoin
6+
{
7+
8+
public function testJoin()
9+
{
10+
$arr[0] = '1';
11+
$arr[2] = '2';
12+
$arr[3] = '3';
13+
14+
join('item', $arr);
15+
Join::foo();
16+
}
17+
18+
}

0 commit comments

Comments
 (0)