mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +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
|
@ -39,7 +39,7 @@ class scormreport_basic_privacy_testcase extends \core_privacy\tests\provider_te
|
|||
/**
|
||||
* Basic setup for these tests.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class scormreport_interactions_privacy_testcase extends \core_privacy\tests\prov
|
|||
/**
|
||||
* Basic setup for these tests.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class scormreport_objectives_privacy_testcase extends \core_privacy\tests\provid
|
|||
/**
|
||||
* Basic setup for these tests.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class mod_scorm_event_testcase extends advanced_testcase {
|
|||
/** @var stdClass store course module object */
|
||||
protected $eventcm;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
$this->setAdminUser();
|
||||
$this->eventcourse = $this->getDataGenerator()->create_course();
|
||||
$this->eventuser = $this->getDataGenerator()->create_user();
|
||||
|
|
|
@ -45,7 +45,7 @@ class mod_scorm_external_testcase extends externallib_advanced_testcase {
|
|||
/**
|
||||
* Set up for every test
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
global $DB, $CFG;
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
|
|
|
@ -45,7 +45,7 @@ class mod_scorm_lib_testcase extends externallib_advanced_testcase {
|
|||
/**
|
||||
* Set up for every test
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
|
|
|
@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/mod/scorm/lib.php');
|
|||
*/
|
||||
class mod_scorm_locallib_testcase extends advanced_testcase {
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue