mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-17 05:48:43 +02:00
Fix unit tests in totara 10
- Change outagelib_test to use the auth_outage_base_testcase base class - Remove outages from test table in tearDown function after each test.
This commit is contained in:
@@ -74,4 +74,9 @@ abstract class auth_outage_base_testcase extends advanced_testcase {
|
||||
$CFG->wwwroot = 'http://www.example.com/moodle';
|
||||
$CFG->httpswwwroot = $CFG->wwwroot;
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
global $DB;
|
||||
$DB->delete_records('auth_outage');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ require_once($CFG->libdir.'/adminlib.php');
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @SuppressWarnings(public) Allow as many methods as needed.
|
||||
*/
|
||||
class outagelib_test extends advanced_testcase {
|
||||
class outagelib_test extends auth_outage_base_testcase {
|
||||
/**
|
||||
* Check if maintenance message is disabled as needed.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user