mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-45204 phpunit: Fixed test_localcachedir test
make_localcache_directory is the first call to make localcache, which is already created by reset. So deleting existing localcache directory will pass this test
This commit is contained in:
parent
1a14f8a6de
commit
54957bdbf7
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user