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
|
@ -48,7 +48,7 @@ class customfield_checkbox_plugin_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Tests set up.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest();
|
||||
|
||||
$this->cfcat = $this->get_generator()->create_category();
|
||||
|
|
|
@ -48,7 +48,7 @@ class customfield_date_plugin_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Tests set up.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest();
|
||||
|
||||
$this->cfcat = $this->get_generator()->create_category();
|
||||
|
@ -206,4 +206,4 @@ class customfield_date_plugin_testcase extends advanced_testcase {
|
|||
public function test_delete() {
|
||||
$this->cfcat->get_handler()->delete_all();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class customfield_select_plugin_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Tests set up.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest();
|
||||
|
||||
$this->cfcat = $this->get_generator()->create_category();
|
||||
|
@ -199,4 +199,4 @@ class customfield_select_plugin_testcase extends advanced_testcase {
|
|||
public function test_delete() {
|
||||
$this->cfcat->get_handler()->delete_all();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class customfield_text_plugin_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Tests set up.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest();
|
||||
|
||||
$this->cfcat = $this->get_generator()->create_category();
|
||||
|
|
|
@ -48,7 +48,7 @@ class customfield_textarea_plugin_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Tests set up.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->resetAfterTest();
|
||||
|
||||
$this->cfcat = $this->get_generator()->create_category();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue