From ace998b8ebb5d96c29543f9f1219799314b9ff3c Mon Sep 17 00:00:00 2001 From: Meirza Date: Wed, 8 Feb 2023 21:28:39 +0700 Subject: [PATCH] MDL-77347 mod_survey: Added missing class properties. In PHP 8.2 and later, setting a value to an undeclared class property is deprecated and emits a deprecation notice. So we need to add missing class properties that still need to be declared. --- mod/survey/tests/externallib_test.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mod/survey/tests/externallib_test.php b/mod/survey/tests/externallib_test.php index 4cb49e83ffc..105bfd64ff8 100644 --- a/mod/survey/tests/externallib_test.php +++ b/mod/survey/tests/externallib_test.php @@ -38,6 +38,30 @@ require_once($CFG->dirroot . '/mod/survey/lib.php'); */ class externallib_test extends externallib_advanced_testcase { + /** @var \stdClass course record. */ + protected $course; + + /** @var \stdClass activity record. */ + protected $survey; + + /** @var \context_module context instance. */ + protected $context; + + /** @var \StdClass course module. */ + protected $cm; + + /** @var \StdClass student record. */ + protected $student; + + /** @var \StdClass teacher record. */ + protected $teacher; + + /** @var \StdClass student role. */ + protected $studentrole; + + /** @var \StdClass teacher role. */ + protected $teacherrole; + /** * Set up for every test */