MDL-41592 behat: Config settings more flexible

Adding the option to just set ->behat_wwwroot to
allow switching to the behat test site.
This commit is contained in:
David Monllao
2013-12-02 14:20:04 +08:00
parent 2d68ba169d
commit f016ecaebf
5 changed files with 147 additions and 29 deletions
+1
View File
@@ -148,6 +148,7 @@ class behat_command {
}
// Checking behat dataroot existence otherwise echo about admin/tool/behat/cli/init.php.
$CFG->behat_dataroot = realpath($CFG->behat_dataroot);
if (empty($CFG->behat_dataroot) || !is_dir($CFG->behat_dataroot) || !is_writable($CFG->behat_dataroot)) {
self::output_msg(get_string('runclitool', 'tool_behat', 'php admin/tool/behat/cli/init.php'));
return BEHAT_EXITCODE_CONFIG;