From caea1e2c53759cec28a5175e3c8ddfac9780f9a5 Mon Sep 17 00:00:00 2001 From: Alexander Bias Date: Sun, 27 Oct 2024 15:34:28 +0100 Subject: [PATCH] Tests: Call parent setup() function when instantiating PHPUnit tests --- CHANGES.md | 4 ++++ tests/rules_test.php | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 43379a2..318e553 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,10 @@ moodle-local_profilecohort Changes ------- +### Unreleased + +* 2024-10-27 - Tests: Call parent setup() function when instantiating PHPUnit tests. + ### v4.3-r3 * 2024-08-20 - Remove duplicate header on overview page. diff --git a/tests/rules_test.php b/tests/rules_test.php index 94ba9e9..ba08e23 100644 --- a/tests/rules_test.php +++ b/tests/rules_test.php @@ -73,6 +73,9 @@ public function setUp(): void { $this->cohortids[] = $this->getDataGenerator()->create_cohort(['component' => 'local_profilecohort'])->id; $this->resetAfterTest(); + + // Call parent setup. + parent::setUp(); } /**