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:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user