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:
Kristian Ringer
2019-05-08 13:30:08 +10:00
parent f72a03aa5a
commit c8f99a7bf3
2 changed files with 6 additions and 1 deletions

View File

@@ -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');
}
}

View File

@@ -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.
*/