diff --git a/admin/tool/usertours/tests/excludecategory_filter_test.php b/admin/tool/usertours/tests/excludecategory_filter_test.php
index e526e503cf7..89c28033df8 100644
--- a/admin/tool/usertours/tests/excludecategory_filter_test.php
+++ b/admin/tool/usertours/tests/excludecategory_filter_test.php
@@ -14,23 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Tests for exclude category filter.
- *
- * @package tool_usertours
- * @copyright 2022 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
namespace tool_usertours;
use tool_usertours\local\filter\excludecategory;
-defined('MOODLE_INTERNAL') || die();
-
-global $CFG;
-require_once($CFG->libdir . '/formslib.php');
-
/**
* Tests for exclude category filter.
*
@@ -40,22 +27,22 @@ require_once($CFG->libdir . '/formslib.php');
*/
class excludecategory_filter_test extends \advanced_testcase {
/**
- * @var $course Test course
+ * @var \stdClass $course Test course
*/
protected $course;
/**
- * @var $category Test category
+ * @var \stdClass $category Test category
*/
protected $category;
/**
- * @var $category2 Test category2
+ * @var \stdClass $category2 Test category2
*/
protected $category2;
/**
- * @var $user Test user
+ * @var \stdClass $user Test user
*/
protected $user;
diff --git a/admin/tool/usertours/tests/excludecourse_filter_test.php b/admin/tool/usertours/tests/excludecourse_filter_test.php
index 433c426e4e1..3a07c0e4b53 100644
--- a/admin/tool/usertours/tests/excludecourse_filter_test.php
+++ b/admin/tool/usertours/tests/excludecourse_filter_test.php
@@ -14,23 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Tests for exclude course filter.
- *
- * @package tool_usertours
- * @copyright 2022 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
namespace tool_usertours;
use tool_usertours\local\filter\excludecourse;
-defined('MOODLE_INTERNAL') || die();
-
-global $CFG;
-require_once($CFG->libdir . '/formslib.php');
-
/**
* Tests for exclude course filter.
*
@@ -40,17 +27,17 @@ require_once($CFG->libdir . '/formslib.php');
*/
class excludecourse_filter_test extends \advanced_testcase {
/**
- * @var $course Test course
+ * @var \stdClass $course Test course
*/
protected $course;
/**
- * @var $course2 Test $course2
+ * @var \stdClass $course2 Test $course2
*/
protected $course2;
/**
- * @var $module Test module
+ * @var \stdClass $module Test module
*/
protected $module;