Commit 73e65355 authored by Aaron Wells's avatar Aaron Wells

Fix issue with "test_environment_enabled.txt: Is a directory"

The "check_dir_exists()" method needs to operate on the containing
directory, *not* on the config file itself.

Change-Id: I54f68ff102f7fa0ec5848c8241210d2e954a8f25
parent bb71f2ed
......@@ -232,6 +232,7 @@ function check_test_site_config() {
$contents = '$CFG->behat_wwwroot, $CFG->behat_dbprefix and $CFG->behat_dataroot' .
' are currently used as $CFG->wwwroot, $CFG->dbprefix and $CFG->dataroot';
$filepath = self::get_test_file_path();
check_dir_exists(dirname($filepath), true);
if (!file_put_contents($filepath, $contents)) {
behat_error(BEHAT_MAHARA_EXITCODE_NOTWRITABLEDATAROOT, 'File ' . $filepath . ' can not be created');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment