MDL-81698 phpunit: Apply various fixes towards 1by1 execution

The changes here are heterogeneous:
- Include stuff that is not available (other test has included it).
  Sometimes local to a unit test, others in setupBeforeClass() or
  globally, ... depends on every case.
- Rename some tests (namespaces, test name, ...) towards getting it
  running.
- Amend small bits here and there.

Important note: I've left any "cosmetic" warning out from the
changes, only a few errors (like long array syntax) have been fixed.
This commit is contained in:
Eloy Lafuente (stronk7)
2024-05-25 17:19:52 +02:00
parent 80f521eed0
commit b2a485e244
18 changed files with 96 additions and 49 deletions
+2 -1
View File
@@ -1690,7 +1690,8 @@ class completionlib_test extends advanced_testcase {
* @covers \aggregate_completions
*/
public function test_aggregate_completions() {
global $DB;
global $DB, $CFG;
require_once($CFG->dirroot.'/completion/criteria/completion_criteria_activity.php');
$this->resetAfterTest(true);
$time = time();