mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 03:31:31 +00:00
updated streamline-setup v2
This commit is contained in:
+21
-6
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user