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:
Eloy Lafuente (stronk7)
2024-06-14 16:04:57 +02:00
parent 2bf886f9dd
commit 674497a12c
432 changed files with 495 additions and 0 deletions
@@ -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();
}