updated streamline-setup v2

This commit is contained in:
2025-01-15 08:53:49 -08:00
committed by alec.turner
parent a2ce9248f0
commit 4b569f81b0
20228 changed files with 2932048 additions and 63204 deletions
@@ -11,19 +11,34 @@ if (defined('PHP_CODESNIFFER_IN_TESTS') === false) {
define('PHP_CODESNIFFER_IN_TESTS', true);
}
/*
* Determine whether the test suite should be run in CBF mode.
*
* Use `<php><env name="PHP_CODESNIFFER_CBF" value="1"/></php>` in a `phpunit.xml` file
* or set the ENV variable at an OS-level to enable CBF mode.
*
* To run the CBF specific tests, use the following command:
* vendor/bin/phpunit --group CBF --exclude-group nothing
*
* If the ENV variable has not been set, or is set to "false", the tests will run in CS mode.
*/
if (defined('PHP_CODESNIFFER_CBF') === false) {
define('PHP_CODESNIFFER_CBF', false);
$cbfMode = getenv('PHP_CODESNIFFER_CBF');
if ($cbfMode === '1') {
define('PHP_CODESNIFFER_CBF', true);
echo 'Note: Tests are running in "CBF" mode'.PHP_EOL.PHP_EOL;
} else {
define('PHP_CODESNIFFER_CBF', false);
echo 'Note: Tests are running in "CS" mode'.PHP_EOL.PHP_EOL;
}
}
if (defined('PHP_CODESNIFFER_VERBOSITY') === false) {
define('PHP_CODESNIFFER_VERBOSITY', 0);
}
if (is_file(__DIR__.'/../autoload.php') === true) {
include_once __DIR__.'/../autoload.php';
} else {
include_once 'PHP/CodeSniffer/autoload.php';
}
require_once __DIR__.'/../autoload.php';
$tokens = new \PHP_CodeSniffer\Util\Tokens();