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
+4 -4
View File
@@ -75,7 +75,7 @@ class adminlib_test extends \advanced_testcase {
* @param string $column name
* @param bool $expected whether it should be replaced
*/
public function test_db_should_replace(string $table, string $column, bool $expected) {
public function test_db_should_replace(string $table, string $column, bool $expected): void {
$actual = db_should_replace($table, $column);
$this->assertSame($actual, $expected);
}
@@ -120,7 +120,7 @@ class adminlib_test extends \advanced_testcase {
* @param string $column name
* @param bool $expected whether it should be replaced
*/
public function test_db_should_replace_additional_skip_tables(string $table, string $column, bool $expected) {
public function test_db_should_replace_additional_skip_tables(string $table, string $column, bool $expected): void {
$this->resetAfterTest();
$additionalskiptables = 'context, quiz_attempts, role_assignments ';
$actual = db_should_replace($table, $column, $additionalskiptables);
@@ -132,7 +132,7 @@ class adminlib_test extends \advanced_testcase {
*
* @covers ::admin_output_new_settings_by_page
*/
public function test_admin_output_new_settings_by_page() {
public function test_admin_output_new_settings_by_page(): void {
$this->resetAfterTest();
$this->setAdminUser();
@@ -163,7 +163,7 @@ class adminlib_test extends \advanced_testcase {
*
* @covers ::admin_apply_default_settings
*/
public function test_admin_apply_default_settings() {
public function test_admin_apply_default_settings(): void {
global $DB;
$this->resetAfterTest();