MDL-43235 behat: Ensure that behat_config_manager::get_config_file_contents() has...
authorDavid Monllao <davidm@moodle.com>
Thu, 5 Dec 2013 05:18:45 +0000 (13:18 +0800)
committerDavid Monllao <davidm@moodle.com>
Fri, 13 Dec 2013 06:20:03 +0000 (14:20 +0800)
lib/behat/classes/behat_config_manager.php

index d559ff4..a967cad 100644 (file)
@@ -183,6 +183,11 @@ class behat_config_manager {
         // We require here when we are sure behat dependencies are available.
         require_once($CFG->dirroot . '/vendor/autoload.php');
 
+        // It is possible that it has no value as we don't require a full behat setup to list the step definitions.
+        if (empty($CFG->behat_wwwroot)) {
+            $CFG->behat_wwwroot = 'http://itwillnotbeused.com';
+        }
+
         $basedir = $CFG->dirroot . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'behat';
         $config = array(
             'default' => array(