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
@@ -33,6 +33,10 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
die(); // No access from web!.
}
// 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');