diff --git a/lib/tests/setuplib_test.php b/lib/tests/setuplib_test.php index a17971deabc..f1f999d5c38 100644 --- a/lib/tests/setuplib_test.php +++ b/lib/tests/setuplib_test.php @@ -155,6 +155,9 @@ class core_setuplib_testcase extends advanced_testcase { $this->setCurrentTimeStart(); $timestampfile = "$CFG->localcachedir/.lastpurged"; + // Delete existing localcache directory, as this is testing first call + // to make_localcache_directory. + remove_dir($CFG->localcachedir, true); $dir = make_localcache_directory('', false); $this->assertSame($CFG->localcachedir, $dir); $this->assertFileNotExists("$CFG->localcachedir/.htaccess");