MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods now are required to return void. This was warned with phpunit 7 and now is enforced. At the same time, fix a few wrong function names, provider data and param types, return statements...
This commit is contained in:
@@ -43,7 +43,7 @@ class task_database_logger_testcase extends advanced_testcase {
|
||||
/**
|
||||
* Setup to backup the database before mocking.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
global $DB;
|
||||
|
||||
$this->DB = $DB;
|
||||
@@ -52,7 +52,7 @@ class task_database_logger_testcase extends advanced_testcase {
|
||||
/**
|
||||
* Tear down to unmock the database where it was mocked.
|
||||
*/
|
||||
public function tearDown() {
|
||||
public function tearDown(): void {
|
||||
global $DB;
|
||||
|
||||
$DB = $this->DB;
|
||||
|
||||
Reference in New Issue
Block a user