mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +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
|
@ -38,7 +38,7 @@ class repository_flickr_privacy_testcase extends provider_testcase {
|
|||
/**
|
||||
* Overriding setUp() function to always reset after tests.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class repository_nextcloud_access_controlled_link_manager_testcase extends advan
|
|||
/**
|
||||
* SetUp to create an repository instance.
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Admin is necessary to create issuer object.
|
||||
|
@ -630,4 +630,4 @@ XML;
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class repository_nextcloud_lib_testcase extends advanced_testcase {
|
|||
/**
|
||||
* SetUp to create an repository instance.
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Admin is neccessary to create api and issuer objects.
|
||||
|
|
|
@ -40,7 +40,7 @@ class repository_nextcloud_ocs_testcase extends advanced_testcase {
|
|||
/**
|
||||
* SetUp to create issuer and endpoints for OCS testing.
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Admin is neccessary to create issuer object.
|
||||
|
|
|
@ -38,7 +38,7 @@ class repository_onedrive_privacy_testcase extends \core_privacy\tests\provider_
|
|||
/**
|
||||
* Overriding setUp() function to always reset after tests.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class repository_recent_lib_testcase extends advanced_testcase {
|
|||
/**
|
||||
* SetUp to create an repository instance.
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
global $USER;
|
||||
$this->setAdminUser();
|
||||
$this->usercontext = context_user::instance($USER->id);
|
||||
|
|
|
@ -41,7 +41,7 @@ class core_repository_privacy_testcase extends \core_privacy\tests\provider_test
|
|||
/**
|
||||
* Overriding setUp() function to always reset after tests.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue