From ffb9e27456a055dbde9e479c9fd60226f3cea473 Mon Sep 17 00:00:00 2001 From: Sasha Anastasi Date: Wed, 26 Feb 2025 16:40:41 +1300 Subject: [PATCH] add tearDown method to runtests --- tests/dml/installation_test.php | 5 +++++ tests/dml/outagedb_test.php | 5 +++++ tests/form/outage/forms_test.php | 5 +++++ tests/local/cli/cli_test.php | 5 +++++ tests/local/cli/cli_testcase.php | 5 +++++ tests/local/cli/create_test.php | 5 +++++ tests/local/cli/finish_test.php | 5 +++++ tests/local/cli/waitforit_test.php | 5 +++++ tests/local/controllers/infopage_test.php | 5 +++++ tests/local/controllers/maintenance_static_page_test.php | 5 +++++ tests/local/outage_test.php | 5 +++++ tests/local/outagelib_test.php | 5 +++++ 12 files changed, 60 insertions(+) diff --git a/tests/dml/installation_test.php b/tests/dml/installation_test.php index bd28a40..8646788 100644 --- a/tests/dml/installation_test.php +++ b/tests/dml/installation_test.php @@ -44,6 +44,11 @@ require_once(__DIR__.'/../base_testcase.php'); * @covers \auth_outage\dml\outagedb */ class installation_test extends \auth_outage\base_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Checks if plugin cleans up data after uninstall. * diff --git a/tests/dml/outagedb_test.php b/tests/dml/outagedb_test.php index 07b4a01..31c4d59 100644 --- a/tests/dml/outagedb_test.php +++ b/tests/dml/outagedb_test.php @@ -40,6 +40,11 @@ require_once(__DIR__.'/../base_testcase.php'); * @covers \auth_outage\dml\outagedb */ class outagedb_test extends \auth_outage\base_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Creates an array of ids in from the given outages array. * @param outage[] $outages An array of outages. diff --git a/tests/form/outage/forms_test.php b/tests/form/outage/forms_test.php index 0f28f55..250475a 100644 --- a/tests/form/outage/forms_test.php +++ b/tests/form/outage/forms_test.php @@ -40,6 +40,11 @@ require_once(__DIR__.'/../../base_testcase.php'); * @covers \auth_outage\form\outage\edit */ class forms_test extends \auth_outage\base_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Create a delete form. */ diff --git a/tests/local/cli/cli_test.php b/tests/local/cli/cli_test.php index 87b172d..6fedc4f 100644 --- a/tests/local/cli/cli_test.php +++ b/tests/local/cli/cli_test.php @@ -38,6 +38,11 @@ require_once(__DIR__.'/cli_testcase.php'); * @covers \auth_outage\local\cli\create */ class cli_test extends cli_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Tests providing an unknown parameter. */ diff --git a/tests/local/cli/cli_testcase.php b/tests/local/cli/cli_testcase.php index b39a601..9b6c669 100644 --- a/tests/local/cli/cli_testcase.php +++ b/tests/local/cli/cli_testcase.php @@ -37,6 +37,11 @@ require_once(__DIR__.'/../../base_testcase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ abstract class cli_testcase extends \auth_outage\base_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Always enable the auth outage plugin, resets after test and set no parameters. */ diff --git a/tests/local/cli/create_test.php b/tests/local/cli/create_test.php index ec5b548..9e5f8be 100644 --- a/tests/local/cli/create_test.php +++ b/tests/local/cli/create_test.php @@ -41,6 +41,11 @@ require_once(__DIR__.'/cli_testcase.php'); * @covers \auth_outage\local\cli\create */ class create_test extends cli_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Tests without any arguments. */ diff --git a/tests/local/cli/finish_test.php b/tests/local/cli/finish_test.php index 163a28b..c8fbf8a 100644 --- a/tests/local/cli/finish_test.php +++ b/tests/local/cli/finish_test.php @@ -41,6 +41,11 @@ require_once(__DIR__.'/cli_testcase.php'); * @covers \auth_outage\local\cli\finish */ class finish_test extends cli_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Tests the constructor. */ diff --git a/tests/local/cli/waitforit_test.php b/tests/local/cli/waitforit_test.php index db596e9..7a3e74b 100644 --- a/tests/local/cli/waitforit_test.php +++ b/tests/local/cli/waitforit_test.php @@ -41,6 +41,11 @@ require_once(__DIR__.'/cli_testcase.php'); * @covers \auth_outage\local\cli\waitforit */ class waitforit_test extends cli_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Tests the constructor. */ diff --git a/tests/local/controllers/infopage_test.php b/tests/local/controllers/infopage_test.php index 3cd582d..18aeecc 100644 --- a/tests/local/controllers/infopage_test.php +++ b/tests/local/controllers/infopage_test.php @@ -41,6 +41,11 @@ require_once(__DIR__.'/../../base_testcase.php'); * @covers \auth_outage\local\controllers\infopage */ class infopage_test extends \auth_outage\base_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Tests the constructor. */ diff --git a/tests/local/controllers/maintenance_static_page_test.php b/tests/local/controllers/maintenance_static_page_test.php index 29f79df..aa554e4 100644 --- a/tests/local/controllers/maintenance_static_page_test.php +++ b/tests/local/controllers/maintenance_static_page_test.php @@ -41,6 +41,11 @@ require_once(__DIR__.'/../../base_testcase.php'); * @covers \auth_outage\local\controllers\maintenance_static_page_generator */ class maintenance_static_page_test extends \auth_outage\base_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Test template file. */ diff --git a/tests/local/outage_test.php b/tests/local/outage_test.php index 4bf5831..ddb6376 100644 --- a/tests/local/outage_test.php +++ b/tests/local/outage_test.php @@ -29,6 +29,11 @@ require_once(__DIR__.'/../base_testcase.php'); * @covers \auth_outage\local\outage */ class outage_test extends \auth_outage\base_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Tests the constructor. */ diff --git a/tests/local/outagelib_test.php b/tests/local/outagelib_test.php index 73b536b..01f1ebb 100644 --- a/tests/local/outagelib_test.php +++ b/tests/local/outagelib_test.php @@ -33,6 +33,11 @@ require_once(__DIR__.'/../base_testcase.php'); * @covers \auth_outage\local\outagelib */ class outagelib_test extends \auth_outage\base_testcase { + + public function tearDown(): void { + parent::tearDown(); + } + /** * Check if maintenance message is disabled as needed. */