From e533d14f09206a12c7c733c669e15d7a872f2f26 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Wed, 13 Mar 2013 14:35:37 +0800 Subject: [PATCH] MDL-38184 behat: Fixing problem with Windows tests --- repository/upload/tests/behat/behat_repository_upload.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repository/upload/tests/behat/behat_repository_upload.php b/repository/upload/tests/behat/behat_repository_upload.php index 51c3abf1ddb..e2efc158cf7 100644 --- a/repository/upload/tests/behat/behat_repository_upload.php +++ b/repository/upload/tests/behat/behat_repository_upload.php @@ -58,7 +58,8 @@ class behat_repository_upload extends behat_files { $this->open_add_file_window($filepickernode, get_string('pluginname', 'repository_upload')); // Attaching specified file to the node. - $fileabsolutepath = $CFG->dirroot . '/' . $filepath; + $filepath = str_replace('/', DIRECTORY_SEPARATOR, $filepath); + $fileabsolutepath = $CFG->dirroot . DIRECTORY_SEPARATOR . $filepath; $inputfilenode = $this->find_file('repo_upload_file'); $inputfilenode->attachFile($fileabsolutepath);