-
-
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.
Merge pull request #27 from drupol/fix-tests-since-workflow-disable
fix tests since lasts commits break them silently
- Loading branch information
Showing
14 changed files
with
129 additions
and
10 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
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 declare_strict_types & declare_equal_normalize | ||
* | ||
* @internal | ||
*/ | ||
final class Scenario5Test extends IntegrationTestCase | ||
{ | ||
protected function getScenarioPath(): string | ||
{ | ||
return __DIR__ . '/fixtures/scenario5'; | ||
} | ||
|
||
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,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 leading_backslash_in_global_namespace | ||
* | ||
* @internal | ||
*/ | ||
final class Scenario6Test extends IntegrationTestCase | ||
{ | ||
protected function getScenarioPath(): string | ||
{ | ||
return __DIR__ . '/fixtures/scenario6'; | ||
} | ||
|
||
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
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,8 @@ | ||
<?php | ||
|
||
declare( strict_types = 1 ); | ||
class Bar { | ||
|
||
public $id; | ||
|
||
} |
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,8 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
class Bar { | ||
|
||
public $id; | ||
|
||
} |
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,3 @@ | ||
<?php | ||
|
||
throw new \Exception(); |
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,3 @@ | ||
<?php | ||
|
||
throw new Exception(); |
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