diff --git a/tests/tool_objectfs_testcase.php b/tests/tool_objectfs_testcase.php index afc859ee..c7a477e5 100644 --- a/tests/tool_objectfs_testcase.php +++ b/tests/tool_objectfs_testcase.php @@ -42,6 +42,11 @@ protected function setUp(): void { $this->filesystem = new test_file_system(); $this->logger = new \tool_objectfs\log\null_logger(); + // Get the file system with reset flag enabled to reset it, + // since it is static and may have been initialised as a filedir system in another test + // instead of the desired objectfs test file system. + get_file_storage(true); + $this->resetAfterTest(true); }