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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user