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:
@@ -42,7 +42,7 @@ class phpunit_dataset_test extends advanced_testcase {
|
||||
/**
|
||||
* @covers ::from_files
|
||||
*/
|
||||
public function test_from_files() {
|
||||
public function test_from_files(): void {
|
||||
|
||||
$ds = new phpunit_dataset();
|
||||
|
||||
@@ -148,7 +148,7 @@ class phpunit_dataset_test extends advanced_testcase {
|
||||
* @covers ::from_file
|
||||
*/
|
||||
public function test_from_file(string $fullpath, string $tablename, ?string $exception,
|
||||
array $tables, array $columns, array $rows) {
|
||||
array $tables, array $columns, array $rows): void {
|
||||
|
||||
$ds = new phpunit_dataset();
|
||||
|
||||
@@ -238,7 +238,7 @@ class phpunit_dataset_test extends advanced_testcase {
|
||||
* @covers ::from_string
|
||||
*/
|
||||
public function test_from_string(string $content, string $type, string $tablename, ?string $exception,
|
||||
array $tables, array $columns, array $rows) {
|
||||
array $tables, array $columns, array $rows): void {
|
||||
|
||||
$ds = new phpunit_dataset();
|
||||
|
||||
@@ -381,7 +381,7 @@ class phpunit_dataset_test extends advanced_testcase {
|
||||
* @covers ::from_array
|
||||
*/
|
||||
public function test_from_array(array $structure, ?string $exception,
|
||||
array $tables, array $columns, array $rows, ?bool $repeated = false) {
|
||||
array $tables, array $columns, array $rows, ?bool $repeated = false): void {
|
||||
|
||||
$ds = new phpunit_dataset();
|
||||
|
||||
@@ -472,7 +472,7 @@ class phpunit_dataset_test extends advanced_testcase {
|
||||
* @covers ::load_csv
|
||||
*/
|
||||
public function test_load_csv(array $files, ?string $exception,
|
||||
array $tables, array $columns, array $rows) {
|
||||
array $tables, array $columns, array $rows): void {
|
||||
|
||||
$ds = new phpunit_dataset();
|
||||
|
||||
@@ -640,7 +640,7 @@ class phpunit_dataset_test extends advanced_testcase {
|
||||
* @covers ::load_xml
|
||||
*/
|
||||
public function test_load_xml(array $files, ?string $exception,
|
||||
array $tables, array $columns, array $rows) {
|
||||
array $tables, array $columns, array $rows): void {
|
||||
|
||||
$ds = new phpunit_dataset();
|
||||
|
||||
@@ -908,7 +908,7 @@ class phpunit_dataset_test extends advanced_testcase {
|
||||
* @dataProvider get_rows_provider
|
||||
* @covers ::get_rows
|
||||
*/
|
||||
public function test_get_rows(array $files, array $filter, ?string $exception, array $rows) {
|
||||
public function test_get_rows(array $files, array $filter, ?string $exception, array $rows): void {
|
||||
|
||||
$ds = new phpunit_dataset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user