diff --git a/lib/tests/setuplib_test.php b/lib/tests/setuplib_test.php index 2b25604b45bea..0ef30f714a027 100644 --- a/lib/tests/setuplib_test.php +++ b/lib/tests/setuplib_test.php @@ -106,8 +106,8 @@ public function test_localcachedir() { // 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->assertTrue(remove_dir($CFG->localcachedir)); + $dir = make_localcache_directory(''); $this->assertSame($CFG->localcachedir, $dir); $this->assertFileDoesNotExist("$CFG->localcachedir/.htaccess"); $this->assertFileExists($timestampfile);