mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +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 report_completion_events_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Setup testcase.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class report_log_events_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Setup testcase.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest();
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class report_log_lib_testcase extends advanced_testcase {
|
|||
*/
|
||||
private $tree;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->user = $this->getDataGenerator()->create_user();
|
||||
$this->course = $this->getDataGenerator()->create_course();
|
||||
$this->tree = new \core_user\output\myprofile\tree();
|
||||
|
|
|
@ -38,7 +38,7 @@ class report_loglive_events_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Setup testcase.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest();
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ class report_outline_lib_testcase extends advanced_testcase {
|
|||
*/
|
||||
private $roleid;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->user = $this->getDataGenerator()->create_user();
|
||||
$this->user2 = $this->getDataGenerator()->create_user();
|
||||
$this->course = $this->getDataGenerator()->create_course();
|
||||
|
|
|
@ -36,7 +36,7 @@ class report_questioninstances_events_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Setup testcase.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class report_stats_events_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Setup testcase.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->setAdminUser();
|
||||
$this->resetAfterTest();
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class report_stats_lib_testcase extends advanced_testcase {
|
|||
*/
|
||||
private $tree;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->user = $this->getDataGenerator()->create_user();
|
||||
$this->course = $this->getDataGenerator()->create_course();
|
||||
$this->tree = new \core_user\output\myprofile\tree();
|
||||
|
|
|
@ -52,7 +52,7 @@ class report_usersessions_lib_testcase extends advanced_testcase {
|
|||
*/
|
||||
private $tree;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->user = $this->getDataGenerator()->create_user();
|
||||
$this->course = $this->getDataGenerator()->create_course();
|
||||
$this->tree = new \core_user\output\myprofile\tree();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue