From bef7f7e2f4af2a47560b3755da386296a82be047 Mon Sep 17 00:00:00 2001 From: Huong Nguyen Date: Thu, 8 Aug 2024 16:53:19 +0700 Subject: [PATCH] MDL-82745 filter_tex: Improve PHPUnit test --- filter/tex/lib.php | 1 - filter/tex/tests/lib_test.php | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/filter/tex/lib.php b/filter/tex/lib.php index 884f4d3ef87..cb9ad37423e 100644 --- a/filter/tex/lib.php +++ b/filter/tex/lib.php @@ -102,7 +102,6 @@ function filter_tex_sanitize_formula(string $texexp): string { // First, mangle all denied words. $texexp = preg_replace_callback($denylist, function($matches) { - error_log("FORBIDDEN: " . $matches[0]); return 'forbiddenkeyword_' . $matches[0]; }, $texexp diff --git a/filter/tex/tests/lib_test.php b/filter/tex/tests/lib_test.php index 441790fcab6..3aff90fb55e 100644 --- a/filter/tex/tests/lib_test.php +++ b/filter/tex/tests/lib_test.php @@ -49,6 +49,7 @@ class lib_test extends advanced_testcase { ['x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12)', 'x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12)'], ['\usepackage[latin1]{inputenc}', '\usepackage[latin1]{inputenc}'], ['\newcommand{\A}{\verbatiminput}', '\newforbiddenkeyword_command{\A}{\verbatimforbiddenkeyword_input}'], + ['\pdffiledump offset 0 length', 'forbiddenkeyword_\pdffiledump offset 0 length'], ]; }