From 49a4392fc103502ed53cd76b3a9b2f2aadd11a34 Mon Sep 17 00:00:00 2001 From: Markus Heck Date: Wed, 3 Apr 2024 19:04:33 +0200 Subject: [PATCH] class level variable thing for more tests --- tests/backup/moodle2/backup__adler_plugin_test.php | 3 +++ tests/local/course_module/db_test.php | 3 +++ tests/local/section/db_test.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/tests/backup/moodle2/backup__adler_plugin_test.php b/tests/backup/moodle2/backup__adler_plugin_test.php index 9229fa1..070e45e 100644 --- a/tests/backup/moodle2/backup__adler_plugin_test.php +++ b/tests/backup/moodle2/backup__adler_plugin_test.php @@ -15,6 +15,9 @@ * Therefore, this test is implemented as an integration test. */ class backup__adler_plugin_test extends adler_testcase { + private stdClass $course; + private stdClass $module; + public function setUp(): void { parent::setUp(); diff --git a/tests/local/course_module/db_test.php b/tests/local/course_module/db_test.php index e83480a..fc391a3 100644 --- a/tests/local/course_module/db_test.php +++ b/tests/local/course_module/db_test.php @@ -3,6 +3,7 @@ namespace local_adler\local\course_module; +use component_generator_base; use dml_exception; use local_adler\lib\adler_testcase; @@ -11,6 +12,8 @@ class db_test extends adler_testcase { + private component_generator_base $adler_generator; + public function setUp(): void { parent::setUp(); $this->adler_generator = $this->getDataGenerator()->get_plugin_generator('local_adler'); diff --git a/tests/local/section/db_test.php b/tests/local/section/db_test.php index cbad376..fc5b8d3 100644 --- a/tests/local/section/db_test.php +++ b/tests/local/section/db_test.php @@ -3,6 +3,7 @@ namespace local_adler\local\section; +use component_generator_base; use dml_exception; use local_adler\lib\adler_testcase; use Mockery; @@ -12,6 +13,8 @@ class db_test extends adler_testcase { + private component_generator_base $adler_generator; + public function setUp(): void { parent::setUp(); $this->adler_generator = $this->getDataGenerator()->get_plugin_generator('local_adler');