mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Update assertFileNotExists() to assertFileDoesNotExist()
This commit is contained in:
@@ -297,7 +297,12 @@ class auth_outage_maintenance_static_page_test extends auth_outage_base_testcase
|
||||
touch($file);
|
||||
self::assertFileExists($file);
|
||||
maintenance_static_page::create_from_outage(null)->generate();
|
||||
self::assertFileNotExists($file);
|
||||
// Backwards compatibility with older PHPUnit - use old assertFile method.
|
||||
if (method_exists($this, 'assertFileDoesNotExist')) {
|
||||
self::assertFileDoesNotExist($file);
|
||||
} else {
|
||||
self::assertFileNotExists($file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -404,7 +404,12 @@ EOT;
|
||||
|
||||
touch($file);
|
||||
outagelib::update_climaintenance_code($outage);
|
||||
self::assertFileNotExists($file);
|
||||
// Backwards compatibility with older PHPUnit - use old assertFile method.
|
||||
if (method_exists($this, 'assertFileDoesNotExist')) {
|
||||
self::assertFileDoesNotExist($file);
|
||||
} else {
|
||||
self::assertFileNotExists($file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -416,7 +421,12 @@ EOT;
|
||||
|
||||
touch($file);
|
||||
outagelib::update_climaintenance_code(null);
|
||||
self::assertFileNotExists($file);
|
||||
// Backwards compatibility with older PHPUnit - use old assertFile method.
|
||||
if (method_exists($this, 'assertFileDoesNotExist')) {
|
||||
self::assertFileDoesNotExist($file);
|
||||
} else {
|
||||
self::assertFileNotExists($file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -492,7 +502,12 @@ EOT;
|
||||
// The method outagelib::prepare_next_outage() should have been called by save().
|
||||
self::assertFalse(get_config('moodle', 'maintenance_later'));
|
||||
// This file should not exist even if the statement above fails as Moodle does not create it immediately but test anyway.
|
||||
self::assertFileNotExists($CFG->dataroot.'/climaintenance.html');
|
||||
// Backwards compatibility with older PHPUnit - use old assertFile method.
|
||||
if (method_exists($this, 'assertFileDoesNotExist')) {
|
||||
self::assertFileDoesNotExist($CFG->dataroot.'/climaintenance.html');
|
||||
} else {
|
||||
self::assertFileNotExists($CFG->dataroot.'/climaintenance.html');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user