Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2ff512
)
MDL-41592 behat: Setting a default value for CFG->behat_wwwroot in case it is empty
author
David Monllao
<davidm@moodle.com>
Wed, 4 Dec 2013 03:58:32 +0000
(11:58 +0800)
committer
Sam Hemelryk
<sam@moodle.com>
Thu, 5 Dec 2013 04:06:02 +0000
(17:06 +1300)
admin/tool/behat/tests/tool_behat_test.php
patch
|
blob
|
blame
|
history
diff --git
a/admin/tool/behat/tests/tool_behat_test.php
b/admin/tool/behat/tests/tool_behat_test.php
index
c8fa488
..
09db5e6
100644
(file)
--- a/
admin/tool/behat/tests/tool_behat_test.php
+++ b/
admin/tool/behat/tests/tool_behat_test.php
@@
-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);
}
}