From b460bbc0c5c317eaa6d5a7ad64f7ebab9e67bc9b Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Fri, 20 Jan 2023 17:19:16 +0000 Subject: [PATCH] MDL-76977 phpunit: ensure unique data provider keys in mustache test. --- .../output_mustache_helper_collection_test.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/tests/output_mustache_helper_collection_test.php b/lib/tests/output_mustache_helper_collection_test.php index aaac1e989f1..0752ca90b07 100644 --- a/lib/tests/output_mustache_helper_collection_test.php +++ b/lib/tests/output_mustache_helper_collection_test.php @@ -14,19 +14,15 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Unit tests for lib/classes/output/mustache_helper_collection - * - * @copyright 2019 Ryan Wyllie - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -defined('MOODLE_INTERNAL') || die(); - use core\output\mustache_helper_collection; /** * Unit tests for the mustache_helper_collection class. + * + * @package core + * @copyright 2019 Ryan Wyllie + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @covers \core\output\mustache_helper_collection */ class core_output_mustache_helper_collection_testcase extends advanced_testcase { /** @@ -71,7 +67,7 @@ class core_output_mustache_helper_collection_testcase extends advanced_testcase 'input' => 'core, {{#js}} some nasty JS {{/js}}, test', 'expected' => 'core, {{}}, test' ], - 'single blacklist 3' => [ + 'single blacklist 4' => [ 'blacklist' => ['js'], 'input' => 'core, {{#ok}} this is ok {{/ok}}, {{#js}} some nasty JS {{/js}}', 'expected' => 'core, {{#ok}} this is ok {{/ok}}, {{}}' @@ -116,7 +112,7 @@ class core_output_mustache_helper_collection_testcase extends advanced_testcase 'input' => '{{#foo}} blah {{/foo}}, {{#js}} js {{/js}}, {{#foo}} blah {{/foo}}', 'expected' => '{{}}' ], - 'multiple blacklist 4' => [ + 'multiple blacklist 5' => [ 'blacklist' => ['js', 'foo'], 'input' => 'core, move, {{#js}} JS {{#foo}} blah {{/foo}} {{/js}}', 'expected' => 'core, move, {{}}'