mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
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:
parent
c611109ed7
commit
d81a94807b
421 changed files with 531 additions and 531 deletions
|
@ -43,7 +43,7 @@ class auth_email_external_testcase extends externallib_advanced_testcase {
|
|||
/**
|
||||
* Set up for every test
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
global $CFG, $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
|
|
@ -44,7 +44,7 @@ class auth_manual_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Setup test data.
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
$this->authplugin = new auth_plugin_manual();
|
||||
set_config('expiration', '1', 'auth_manual');
|
||||
|
|
|
@ -45,7 +45,7 @@ class auth_manual_privacy_testcase extends \core_privacy\tests\provider_testcase
|
|||
/**
|
||||
* Basic setup for these tests.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
$this->authplugin = new auth_plugin_manual();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class auth_mnet_privacy_testcase extends provider_testcase {
|
|||
/**
|
||||
* Set up method.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class auth_oauth2_privacy_testcase extends provider_testcase {
|
|||
/**
|
||||
* Set up method.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class core_auth_external_testcase extends externallib_advanced_testcase {
|
|||
/**
|
||||
* Set up for every test
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
global $CFG;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
@ -60,7 +60,7 @@ class core_auth_external_testcase extends externallib_advanced_testcase {
|
|||
/**
|
||||
* Tear down to restore old logging..
|
||||
*/
|
||||
protected function tearDown() {
|
||||
protected function tearDown(): void {
|
||||
ini_set('error_log', $this->oldlog);
|
||||
parent::tearDown();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ use core_auth\privacy\provider;
|
|||
*/
|
||||
class core_auth_privacy_testcase extends provider_testcase {
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue