MDL-81522 phpunit: Add missing void return type to all tests

While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
This commit is contained in:
Eloy Lafuente (stronk7)
2024-06-11 12:18:04 +02:00
parent db07c09afc
commit 1093256560
1360 changed files with 9928 additions and 9928 deletions
+8 -8
View File
@@ -33,7 +33,7 @@ class api_test extends \advanced_testcase {
$this->resetAfterTest();
}
public function test_update_completion_date_event() {
public function test_update_completion_date_event(): void {
global $CFG, $DB;
$this->setAdminUser();
@@ -72,7 +72,7 @@ class api_test extends \advanced_testcase {
\core_completion\api::update_completion_date_event($assign->cmid, 'assign', null, $time);
}
public function test_update_completion_date_event_update() {
public function test_update_completion_date_event_update(): void {
global $CFG, $DB;
$this->setAdminUser();
@@ -107,7 +107,7 @@ class api_test extends \advanced_testcase {
$this->assertEquals($time + DAYSECS, $event->timesort);
}
public function test_update_completion_date_event_delete() {
public function test_update_completion_date_event_delete(): void {
global $CFG, $DB;
$this->setAdminUser();
@@ -130,7 +130,7 @@ class api_test extends \advanced_testcase {
$this->assertEquals(0, $DB->count_records('event'));
}
public function test_update_completion_date_event_completion_disabled() {
public function test_update_completion_date_event_completion_disabled(): void {
global $CFG, $DB;
$this->setAdminUser();
@@ -150,7 +150,7 @@ class api_test extends \advanced_testcase {
$this->assertEquals(0, $DB->count_records('event'));
}
public function test_update_completion_date_event_update_completion_disabled() {
public function test_update_completion_date_event_update_completion_disabled(): void {
global $CFG, $DB;
$this->setAdminUser();
@@ -188,7 +188,7 @@ class api_test extends \advanced_testcase {
$this->assertEquals($time, $event->timesort);
}
public function test_update_completion_date_event_delete_completion_disabled() {
public function test_update_completion_date_event_delete_completion_disabled(): void {
global $CFG, $DB;
$this->setAdminUser();
@@ -217,7 +217,7 @@ class api_test extends \advanced_testcase {
/**
* Test for mark_course_completions_activity_criteria().
*/
public function test_mark_course_completions_activity_criteria() {
public function test_mark_course_completions_activity_criteria(): void {
global $DB, $CFG;
require_once($CFG->dirroot.'/completion/criteria/completion_criteria_activity.php');
$this->resetAfterTest(true);
@@ -293,7 +293,7 @@ class api_test extends \advanced_testcase {
* Test for mark_course_completions_activity_criteria() with different completionpassgrade settings.
* @covers ::mark_course_completions_activity_criteria
*/
public function test_mark_course_completions_activity_criteria_completion_states() {
public function test_mark_course_completions_activity_criteria_completion_states(): void {
global $DB, $CFG;
require_once($CFG->dirroot . '/completion/criteria/completion_criteria_activity.php');
$this->resetAfterTest(true);