-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #25: enable ordered_imports.case_sensitive by default since Dru…
…pal Coder (8.3.25) is now enforcing it (#29) * Issue #25: ordered_importS is case sensitive since Coder 8.3.25. * Issue #25: Fix review feedbacks. * fix tests following changes * add coverage of ordered_imports.case_sensitive * enable ordered_imports.case_sensitive by default since Drupal Coder (8.3.25) is now enforcing it --------- Co-authored-by: Florent Torregrosa <[email protected]>
- Loading branch information
1 parent
78fed0a
commit ff36e84
Showing
7 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace drupol\PhpCsFixerConfigsDrupal\Tests\Integration; | ||
|
||
use drupol\PhpCsFixerConfigsDrupal\Config\Drupal8; | ||
use drupol\PhpCsFixerConfigsDrupal\Tests\IntegrationTestCase; | ||
use PhpCsFixer\FixerFactory; | ||
use PhpCsFixer\RuleSet\RuleSet; | ||
|
||
/** | ||
* @author Kevin Wenger <[email protected]> | ||
* | ||
* Covers the PHP-CS-Fixer rules ordered_imports.case_sensitive | ||
* | ||
* @internal | ||
*/ | ||
final class Scenario7Test extends IntegrationTestCase | ||
{ | ||
protected function getScenarioPath(): string | ||
{ | ||
return __DIR__ . '/fixtures/scenario7'; | ||
} | ||
|
||
public function testDrupal8Config(): void | ||
{ | ||
$drupal8 = new Drupal8(); | ||
$rules = $drupal8->getRules(); | ||
$ruleset = new RuleSet($rules); | ||
|
||
$factory = (new FixerFactory()) | ||
->registerBuiltInFixers() | ||
->registerCustomFixers($drupal8->getCustomFixers()) | ||
->useRuleSet($ruleset); | ||
|
||
$fixers = []; | ||
foreach ($factory->getFixers() as $fixer) { | ||
$fixers[$fixer->getName()] = $fixer; | ||
} | ||
|
||
$this->doTest($fixers); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
use foo\Bar; | ||
use Foo\Bar; | ||
|
||
namespace foo; | ||
|
||
class Bar { | ||
|
||
} | ||
|
||
namespace Foo; | ||
|
||
class Bar { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
use Foo\Bar; | ||
use foo\Bar; | ||
|
||
namespace foo; | ||
|
||
class Bar { | ||
|
||
} | ||
|
||
namespace Foo; | ||
|
||
class Bar { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters