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
+6 -6
View File
@@ -41,7 +41,7 @@ class progress_test extends \advanced_testcase {
/**
* Tests that the course progress percentage is returned correctly when we have only activity completion.
*/
public function test_course_progress_percentage_with_just_activities() {
public function test_course_progress_percentage_with_just_activities(): void {
global $DB;
// Add a course that supports completion.
@@ -80,7 +80,7 @@ class progress_test extends \advanced_testcase {
/**
* Tests that the course progress percentage is returned correctly when we have a course and activity completion.
*/
public function test_course_progress_percentage_with_activities_and_course() {
public function test_course_progress_percentage_with_activities_and_course(): void {
global $DB;
// Add a course that supports completion.
@@ -125,7 +125,7 @@ class progress_test extends \advanced_testcase {
*
* @covers \core_completion\progress::get_course_progress_percentage.
*/
public function test_course_progress_percentage_completion_state() {
public function test_course_progress_percentage_completion_state(): void {
global $DB, $CFG;
require_once("{$CFG->dirroot}/completion/criteria/completion_criteria_activity.php");
@@ -233,7 +233,7 @@ class progress_test extends \advanced_testcase {
/**
* Tests that the course progress returns null when the course does not support it.
*/
public function test_course_progress_course_not_using_completion() {
public function test_course_progress_course_not_using_completion(): void {
// Create a course that does not use completion.
$course = $this->getDataGenerator()->create_course();
@@ -244,7 +244,7 @@ class progress_test extends \advanced_testcase {
/**
* Tests that the course progress returns null when there are no activities that support it.
*/
public function test_course_progress_no_activities_using_completion() {
public function test_course_progress_no_activities_using_completion(): void {
// Create a course that does support completion.
$course = $this->getDataGenerator()->create_course(array('enablecompletion' => 1));
@@ -258,7 +258,7 @@ class progress_test extends \advanced_testcase {
/**
* Tests that the course progress returns null for a not tracked for completion user in a course.
*/
public function test_course_progress_not_tracked_user() {
public function test_course_progress_not_tracked_user(): void {
global $DB;
// Add a course that supports completion.