MDL-72527 core: Fix behat unit test failure

$CFG->behat_wwwroot, $CFG->behat_dataroot and $CFG->behat_prefix being
undefined resulted in unit test failure.
This commit is contained in:
Matt Clarkson
2021-09-13 11:32:50 +12:00
parent 1d700796ca
commit 728e8c4a3c
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ $allowed = array('wwwroot', 'dataroot', 'dirroot', 'admin', 'directorypermission
$productioncfg = (array)$CFG;
$CFG = new stdClass();
foreach ($productioncfg as $key=>$value) {
if (!in_array($key, $allowed) and strpos($key, 'phpunit_') !== 0) {
if (!in_array($key, $allowed) and strpos($key, 'phpunit_') !== 0 and strpos($key, 'behat_') !== 0) {
// ignore
continue;
}