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
+7 -7
View File
@@ -48,7 +48,7 @@ class cli_test extends \advanced_testcase {
/**
* Tests simple upload with course enrolment and group allocation
*/
public function test_upload_with_course_enrolment() {
public function test_upload_with_course_enrolment(): void {
global $CFG;
$this->resetAfterTest();
set_config('passwordpolicy', 0);
@@ -85,7 +85,7 @@ class cli_test extends \advanced_testcase {
/**
* Test applying defaults during the user upload
*/
public function test_upload_with_applying_defaults() {
public function test_upload_with_applying_defaults(): void {
global $CFG;
$this->resetAfterTest();
set_config('passwordpolicy', 0);
@@ -117,7 +117,7 @@ class cli_test extends \advanced_testcase {
/**
* User upload with user profile fields
*/
public function test_upload_with_profile_fields() {
public function test_upload_with_profile_fields(): void {
global $CFG;
$this->resetAfterTest();
set_config('passwordpolicy', 0);
@@ -150,7 +150,7 @@ class cli_test extends \advanced_testcase {
/**
* Testing that help for CLI does not throw errors
*/
public function test_cli_help() {
public function test_cli_help(): void {
$this->resetAfterTest();
$this->setAdminUser();
$clihelper = $this->construct_helper(["--help"]);
@@ -168,7 +168,7 @@ class cli_test extends \advanced_testcase {
/**
* Testing skipped user when one exists
*/
public function test_create_when_user_exists() {
public function test_create_when_user_exists(): void {
global $CFG;
$this->resetAfterTest();
set_config('passwordpolicy', 0);
@@ -203,7 +203,7 @@ class cli_test extends \advanced_testcase {
/**
* Testing update mode - do not update user records but allow enrolments
*/
public function test_enrolments_when_user_exists() {
public function test_enrolments_when_user_exists(): void {
global $CFG;
require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/uploaduser/locallib.php');
@@ -245,7 +245,7 @@ class cli_test extends \advanced_testcase {
/**
* Testing update mode - update user records and perform enrolments.
*/
public function test_udpate_user() {
public function test_udpate_user(): void {
global $CFG;
require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/uploaduser/locallib.php');