mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods now are required to return void. This was warned with phpunit 7 and now is enforced. At the same time, fix a few wrong function names, provider data and param types, return statements...
This commit is contained in:
parent
c611109ed7
commit
d81a94807b
421 changed files with 531 additions and 531 deletions
4
cache/tests/fixtures/stores.php
vendored
4
cache/tests/fixtures/stores.php
vendored
|
@ -46,7 +46,7 @@ abstract class cachestore_tests extends advanced_testcase {
|
|||
* Sets up the fixture, for example, open a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$class = $this->get_class_name();
|
||||
if (!class_exists($class) || !$class::are_requirements_met()) {
|
||||
$this->markTestSkipped('Could not test '.$class.'. Requirements are not met.');
|
||||
|
@ -190,4 +190,4 @@ abstract class cachestore_tests extends advanced_testcase {
|
|||
$this->assertSame(3, $instance->delete_many(array('many2', 'many3', 'many4')));
|
||||
$this->assertSame(2, $instance->delete_many(array('many1', 'many5', 'many6')));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue