From 0440095f1261af8938890feb48def66abec0e88e Mon Sep 17 00:00:00 2001 From: Michael Milette Date: Sun, 14 Apr 2024 18:04:12 -0400 Subject: [PATCH] Fixed some testing warnings. --- filter.php | 1 - lang/en/filter_filtercodes.php | 1 + tests/filter_test.php | 6 ++++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/filter.php b/filter.php index e704447..4ebdd8f 100644 --- a/filter.php +++ b/filter.php @@ -4529,7 +4529,6 @@ function ($matches) use ($mycohorts) { } } - if (strpos($text, '{ifmin') !== false) { // If there are conditional ifmin tags. // Tag: {ifminassistant}...{/ifminassistant}. // Description: Display content only if user has the role of a non-editing teacher or higher. diff --git a/lang/en/filter_filtercodes.php b/lang/en/filter_filtercodes.php index 5053e3d..396dda6 100644 --- a/lang/en/filter_filtercodes.php +++ b/lang/en/filter_filtercodes.php @@ -21,6 +21,7 @@ * @copyright 2017-2024 TNG Consulting Inc. - www.tngconsulting.ca * @author Michael Milette * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @SuppressWarnings("moodle.Files.LangFilesOrdering.IncorrectOrder") */ defined('MOODLE_INTERNAL') || die(); diff --git a/tests/filter_test.php b/tests/filter_test.php index 44db771..e6186a4 100644 --- a/tests/filter_test.php +++ b/tests/filter_test.php @@ -37,7 +37,7 @@ * @copyright 2017-2024 TNG Consulting Inc. - www.tngconsulting.ca * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class filter_test extends \advanced_testcase { +final class filter_test extends \advanced_testcase { /** * Setup the test framework * @@ -59,9 +59,11 @@ public function setUp(): void { /** * Filter test. * + * @covers MyClass::filter + * * @return void */ - public function test_filtercodes() { + public function test_filtercodes(): void { global $CFG, $USER, $DB, $PAGE; // Create a test course.