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:
@@ -27,7 +27,7 @@ class component_test extends \advanced_testcase {
|
||||
/**
|
||||
* Tests loading a class from /availability/classes.
|
||||
*/
|
||||
public function test_load_class() {
|
||||
public function test_load_class(): void {
|
||||
$result = get_class_methods('\core_availability\info');
|
||||
$this->assertTrue(is_array($result));
|
||||
}
|
||||
@@ -35,7 +35,7 @@ class component_test extends \advanced_testcase {
|
||||
/**
|
||||
* Tests the plugininfo class is present and working.
|
||||
*/
|
||||
public function test_plugin_info() {
|
||||
public function test_plugin_info(): void {
|
||||
// This code will throw debugging information if the plugininfo class
|
||||
// is missing. Unfortunately it doesn't actually cause the test to
|
||||
// fail, but it's obvious when running test at least.
|
||||
|
||||
Reference in New Issue
Block a user