From e44b3abc70fe7e744d21358399ac9189c7ef1434 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. --- .github/workflows/{moodle-plugin-ci.yml => moodle-ci.yml} | 2 +- filter.php | 1 - styles.css | 1 + tests/filter_test.php | 6 ++++-- 4 files changed, 6 insertions(+), 4 deletions(-) rename .github/workflows/{moodle-plugin-ci.yml => moodle-ci.yml} (99%) diff --git a/.github/workflows/moodle-plugin-ci.yml b/.github/workflows/moodle-ci.yml similarity index 99% rename from .github/workflows/moodle-plugin-ci.yml rename to .github/workflows/moodle-ci.yml index d1cf676..9e13644 100644 --- a/.github/workflows/moodle-plugin-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -189,7 +189,7 @@ jobs: - name: Grunt continue-on-error: true # This step will show errors but will not fail if: ${{ !cancelled() }} - run: moodle-plugin-ci grunt --max-lint-warnings 1 + run: moodle-plugin-ci grunt --max-lint-warnings 0 - name: PHPUnit tests continue-on-error: true # This step will show errors but will not fail 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/styles.css b/styles.css index bea2b4f..83107c2 100644 --- a/styles.css +++ b/styles.css @@ -1,6 +1,7 @@ @property --percent { syntax: ''; inherits: true; + /* stylelint-disable-next-line -- not yet supported in FireFox. */ initial-value: 0; } diff --git a/tests/filter_test.php b/tests/filter_test.php index 44db771..e388aec 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 \filter_filtercodes + * * @return void */ - public function test_filtercodes() { + public function test_filtercodes(): void { global $CFG, $USER, $DB, $PAGE; // Create a test course.