From 5414b82e6e0e75473455be45f364cc6b11c8e0b0 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. --- lib/tests/output/mustache_helper_collection_test.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tests/output/mustache_helper_collection_test.php b/lib/tests/output/mustache_helper_collection_test.php index c32dc5aba94..c8b6773e2db 100644 --- a/lib/tests/output/mustache_helper_collection_test.php +++ b/lib/tests/output/mustache_helper_collection_test.php @@ -22,8 +22,10 @@ namespace core\output; * @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 mustache_helper_collection_test extends \advanced_testcase { + /** * Test cases to confirm that disallowed helpers are stripped from the source * text by the helper before being passed to other another helper. This prevents @@ -66,7 +68,7 @@ class mustache_helper_collection_test extends \advanced_testcase { 'input' => 'core, {{#js}} some nasty JS {{/js}}, test', 'expected' => 'core, {{}}, test' ], - 'single disallowed 3' => [ + 'single disallowed 4' => [ 'disallowed' => ['js'], 'input' => 'core, {{#ok}} this is ok {{/ok}}, {{#js}} some nasty JS {{/js}}', 'expected' => 'core, {{#ok}} this is ok {{/ok}}, {{}}' @@ -111,7 +113,7 @@ class mustache_helper_collection_test extends \advanced_testcase { 'input' => '{{#foo}} blah {{/foo}}, {{#js}} js {{/js}}, {{#foo}} blah {{/foo}}', 'expected' => '{{}}' ], - 'multiple disallowed 4' => [ + 'multiple disallowed 5' => [ 'disallowed' => ['js', 'foo'], 'input' => 'core, move, {{#js}} JS {{#foo}} blah {{/foo}} {{/js}}', 'expected' => 'core, move, {{}}'