Merge branch 'MDL-46778-master' of git://github.com/odeialba/moodle

This commit is contained in:
Sara Arjona 2021-09-06 10:03:07 +02:00
commit c467ce725e
7 changed files with 51 additions and 12 deletions

View file

@ -141,6 +141,16 @@ if (defined('BEHAT_SITE_RUNNING')) {
$CFG->wwwroot = $CFG->behat_wwwroot;
$CFG->prefix = $CFG->behat_prefix;
$CFG->dataroot = $CFG->behat_dataroot;
// And we do the same with the optional ones.
$allowedconfigoverride = ['dbname', 'dbuser', 'dbpass', 'dbhost'];
foreach ($allowedconfigoverride as $config) {
$behatconfig = 'behat_' . $config;
if (!isset($CFG->$behatconfig)) {
continue;
}
$CFG->$config = $CFG->$behatconfig;
}
}
}