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
@@ -32,7 +32,7 @@ require_once($CFG->libdir . '/csvlib.class.php');
*/
class processor_test extends \advanced_testcase {
public function test_basic() {
public function test_basic(): void {
global $DB;
$this->resetAfterTest(true);
$this->setAdminUser();
@@ -59,7 +59,7 @@ class processor_test extends \advanced_testcase {
$this->assertTrue($DB->record_exists('course', array('shortname' => 'c2')));
}
public function test_restore_template_course() {
public function test_restore_template_course(): void {
global $DB;
$this->resetAfterTest(true);
$this->setAdminUser();
@@ -95,7 +95,7 @@ class processor_test extends \advanced_testcase {
$this->assertTrue($found);
}
public function test_restore_restore_file() {
public function test_restore_restore_file(): void {
global $DB;
$this->resetAfterTest(true);
$this->setAdminUser();
@@ -132,7 +132,7 @@ class processor_test extends \advanced_testcase {
$this->assertTrue($found);
}
public function test_shortname_template() {
public function test_shortname_template(): void {
global $DB;
$this->resetAfterTest(true);
$this->setAdminUser();
@@ -158,7 +158,7 @@ class processor_test extends \advanced_testcase {
$this->assertEquals('ID123: Course 1', $c->shortname);
}
public function test_empty_csv() {
public function test_empty_csv(): void {
$this->resetAfterTest(true);
$content = array();
@@ -173,7 +173,7 @@ class processor_test extends \advanced_testcase {
$p = new tool_uploadcourse_processor($cir, $options, array());
}
public function test_not_enough_columns() {
public function test_not_enough_columns(): void {
$this->resetAfterTest(true);
$content = array(
@@ -191,7 +191,7 @@ class processor_test extends \advanced_testcase {
$p = new tool_uploadcourse_processor($cir, $options, array());
}
public function test_preview() {
public function test_preview(): void {
global $DB;
$this->resetAfterTest(true);