MDL-41592 behat: Setting a default value for CFG->behat_wwwroot in case it is empty
This commit is contained in:
committed by
Sam Hemelryk
parent
85c39e437b
commit
2fc28aa794
@@ -150,6 +150,11 @@ class tool_behat_testcase extends advanced_testcase {
|
||||
$this->markTestSkipped('Behat not installed.');
|
||||
}
|
||||
|
||||
// It is possible that it has no value.
|
||||
if (empty($CFG->behat_wwwroot)) {
|
||||
$CFG->behat_wwwroot = behat_get_wwwroot();
|
||||
}
|
||||
|
||||
// To avoid user value at config.php level.
|
||||
unset($CFG->behat_config);
|
||||
|
||||
@@ -183,6 +188,8 @@ class tool_behat_testcase extends advanced_testcase {
|
||||
// Lists.
|
||||
$this->assertContains('- feature1', $contents);
|
||||
$this->assertContains('- feature3', $contents);
|
||||
|
||||
unset($CFG->behat_wwwroot);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user