MDL-84793 Behat: Allow CLI scripts to run on Behat instance

This commit is contained in:
sam marshall
2025-05-15 08:50:30 +01:00
parent 6999197243
commit b5bb67d1f1
7 changed files with 29 additions and 0 deletions
+4
View File
@@ -34,6 +34,10 @@ if (function_exists('opcache_reset')) {
define('IGNORE_COMPONENT_CACHE', true);
// It makes no sense to use BEHAT_CLI for this script (you cannot initialise PHPunit starting from
// the Behat environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
require_once(__DIR__.'/../../../../lib/clilib.php');
require_once(__DIR__.'/../../../../lib/phpunit/bootstraplib.php');
require_once(__DIR__.'/../../../../lib/testing/lib.php');