diff --git a/h5p/tests/h5p_file_storage_test.php b/h5p/tests/h5p_file_storage_test.php index 832b4f0f2d0..6726fce425e 100644 --- a/h5p/tests/h5p_file_storage_test.php +++ b/h5p/tests/h5p_file_storage_test.php @@ -462,7 +462,7 @@ class h5p_file_storage_testcase extends \advanced_testcase { ]; $filestorage = new file_storage(); $fs->create_file_from_string($filerecord, 'test string info'); - $expectedfilepath = DIRECTORY_SEPARATOR . file_storage::LIBRARY_FILEAREA . $filepath . 'upgrade.js'; + $expectedfilepath = '/' . file_storage::LIBRARY_FILEAREA . $filepath . 'upgrade.js'; $this->assertEquals($expectedfilepath, $filestorage->getUpgradeScript($machinename, $majorversion, $minorversion)); $this->assertNull($filestorage->getUpgradeScript($machinename, $majorversion, 7)); } @@ -489,9 +489,9 @@ class h5p_file_storage_testcase extends \advanced_testcase { foreach ($files as $file) { if (!$file->is_directory) { $stream = $ziparchive->get_stream($file->index); - $items = explode(DIRECTORY_SEPARATOR, $file->pathname); + $items = explode('/', $file->pathname); array_shift($items); - $path = implode(DIRECTORY_SEPARATOR, $items); + $path = implode('/', $items); $this->h5p_file_storage->saveFileFromZip($this->h5p_tempath, $path, $stream); $filestocheck[] = $path; }