From 2077ae03f8380d0bcc16f45923445621ade16f83 Mon Sep 17 00:00:00 2001 From: sam marshall Date: Thu, 10 Aug 2023 13:28:15 +0100 Subject: [PATCH] MDL-55640 setuplib: test_localcachedir fails sporadically --- lib/tests/setuplib_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests/setuplib_test.php b/lib/tests/setuplib_test.php index 2b25604b45b..0ef30f714a0 100644 --- a/lib/tests/setuplib_test.php +++ b/lib/tests/setuplib_test.php @@ -106,8 +106,8 @@ class setuplib_test extends \advanced_testcase { // 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);