MDL-39441 behat: Restrict config.php allowed settings

This commit is contained in:
David Monllao 2013-07-12 21:42:04 +02:00
parent 07bbbcf174
commit f38e22ed91
3 changed files with 34 additions and 0 deletions

View file

@ -131,6 +131,10 @@ if (!defined('BEHAT_SITE_RUNNING') && !empty($CFG->behat_dataroot) &&
// actions like reset the site or use data generators.
define('BEHAT_SITE_RUNNING', true);
// Clean extra config.php settings.
require_once(__DIR__ . '/../lib/behat/lib.php');
behat_clean_init_config();
$CFG->wwwroot = $CFG->behat_wwwroot;
$CFG->passwordsaltmain = 'moodle';
$CFG->prefix = $CFG->behat_prefix;