MDL-82745 filter_tex: Improve PHPUnit test
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user