Skip to content

Commit

Permalink
Fix importing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Dec 8, 2023
1 parent 05b9058 commit dfea223
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@

declare(strict_types=1);

use PHP_CodeSniffer\Config;
use PHP_CodeSniffer\Util\Standards;

$myStandardName = 'MO4';

require_once __DIR__.'/../vendor/squizlabs/php_codesniffer/tests/bootstrap.php';

// Add this Standard.
PHP_CodeSniffer\Config::setConfigData(
Config::setConfigData(
'installed_paths',
__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$myStandardName,
true
);

// Ignore all other Standards in tests.
$standards = PHP_CodeSniffer\Util\Standards::getInstalledStandards();
$standards = Standards::getInstalledStandards();
$standards[] = 'Generic';

$ignoredStandardsStr = implode(
Expand Down

0 comments on commit dfea223

Please sign in to comment.