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

This commit is contained in:
sam marshall
2025-05-15 08:51:05 +01:00
parent 7e75a3680e
commit 3d17b48855
7 changed files with 29 additions and 0 deletions
+4
View File
@@ -36,6 +36,10 @@ if (function_exists('opcache_reset')) {
define('CLI_SCRIPT', true);
define('CACHE_DISABLE_ALL', true);
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
// from the normal environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
// Basic functions.
require_once(__DIR__ . '/../../../../lib/clilib.php');
require_once(__DIR__ . '/../../../../lib/behat/lib.php');