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:
Eloy Lafuente (stronk7) 2020-08-02 10:59:12 +02:00
parent c611109ed7
commit d81a94807b
421 changed files with 531 additions and 531 deletions

View file

@ -41,7 +41,7 @@ class core_notes_events_testcase extends advanced_testcase {
/** @var stdClass A complete record from post table */
private $noterecord;
public function setUp() {
public function setUp(): void {
global $DB;
$this->resetAfterTest();

View file

@ -50,7 +50,7 @@ class core_notes_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();
@ -114,4 +114,4 @@ class core_notes_lib_testcase extends advanced_testcase {
$nodes->setAccessible(true);
$this->assertArrayNotHasKey('notes', $nodes->getValue($this->tree));
}
}
}