From 2d59580d365417c2b9f7c0621439f975f463e32b Mon Sep 17 00:00:00 2001 From: Matt Porritt Date: Fri, 12 Mar 2021 03:29:55 +0000 Subject: [PATCH] fix unit test signature to be compatible with Moodle 3.10+ --- tests/phpunit/base_testcase.php | 2 +- tests/phpunit/dml/outagedb_test.php | 2 +- tests/phpunit/local/cli/cli_testcase.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/base_testcase.php b/tests/phpunit/base_testcase.php index b4f030e..1204420 100644 --- a/tests/phpunit/base_testcase.php +++ b/tests/phpunit/base_testcase.php @@ -68,7 +68,7 @@ abstract class auth_outage_base_testcase extends advanced_testcase { /** * Setup testcase. */ - public function setUp() { + public function setUp(): void { global $CFG; parent::setUp(); diff --git a/tests/phpunit/dml/outagedb_test.php b/tests/phpunit/dml/outagedb_test.php index af9af0c..e10eb08 100644 --- a/tests/phpunit/dml/outagedb_test.php +++ b/tests/phpunit/dml/outagedb_test.php @@ -78,7 +78,7 @@ class outagedb_test extends auth_outage_base_testcase { /** * Ensure DB tests run as admin. */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->setAdminUser(); } diff --git a/tests/phpunit/local/cli/cli_testcase.php b/tests/phpunit/local/cli/cli_testcase.php index 88aa77f..6e082ce 100644 --- a/tests/phpunit/local/cli/cli_testcase.php +++ b/tests/phpunit/local/cli/cli_testcase.php @@ -40,7 +40,7 @@ abstract class auth_outage_cli_testcase extends auth_outage_base_testcase { /** * Always enable the auth outage plugin, resets after test and set no parameters. */ - public function setUp() { + public function setUp(): void { global $CFG; // PHPUnit does not load config.php file.