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
@@ -44,6 +44,7 @@ class notes_test extends core_reportbuilder_testcase {
public static function setUpBeforeClass(): void {
global $CFG;
require_once("{$CFG->dirroot}/notes/lib.php");
parent::setUpBeforeClass();
}
/**