MDL-81523 phpunit: Add all missing setUp/tearDown parent calls
All setUp(), tearDown(), setUpBeforeClass() and tearDownAfterClass() must, always, call to parent, to ensure that everything is properly set and cleaned. While in a lot of situations this is not needed (parents may not have anything to run), with PHPUnit >= 10 this can become more important because we are going to move the reset code from current placement @ runBare() to setUp()/tearDown(). Note that all the changes performed in this commit have been detected and fixed by moodle-cs (ParentSetUpTearDownSniffTest).
This commit is contained in:
@@ -38,6 +38,7 @@ class migrate_message_data_test extends \advanced_testcase {
|
||||
* This is executed before running any test in this file.
|
||||
*/
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->resetAfterTest();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user