MDL-81522 phpunit: Add missing void return type to all tests #2
This commit includes more changes, all them also adding the :void return type to unit tests missing them. The difference is that all these changes, while also detected perfectly by the moodle.PHPUnit.TestReturnType sniff, were not auto-fixed (like the previous commit ones), because all them do include some "return" statement and, for safety, we don't fix them. All the cases have been visually inspected and confirmed that the existing "return" statements always belong to anon functions within the test body and not the test own return statement.
This commit is contained in:
@@ -771,7 +771,7 @@ class phpunit_dataset_test extends advanced_testcase {
|
||||
* @dataProvider to_database_provider
|
||||
* @covers ::to_database
|
||||
*/
|
||||
public function test_to_database(array $files, ?array $filter, ?string $exception, array $columns, array $rows) {
|
||||
public function test_to_database(array $files, ?array $filter, ?string $exception, array $columns, array $rows): void {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
|
||||
Reference in New Issue
Block a user