mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +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
|
@ -54,7 +54,7 @@ class core_course_enrolment_manager_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Tests set up
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/enrol/locallib.php');
|
||||
$this->setAdminUser();
|
||||
|
|
|
@ -35,7 +35,7 @@ class core_enrol_role_external_testcase extends externallib_advanced_testcase {
|
|||
/**
|
||||
* Tests set up
|
||||
*/
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/enrol/externallib.php');
|
||||
}
|
||||
|
@ -142,4 +142,4 @@ class core_enrol_role_external_testcase extends externallib_advanced_testcase {
|
|||
$categories = core_role_external::unassign_roles(
|
||||
array('roleid' => 3, 'userid' => $USER->id, 'contextid' => $context->id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue