| Línea 36... |
Línea 36... |
| 36 |
* Tex filter library functions tests
|
36 |
* Tex filter library functions tests
|
| 37 |
*
|
37 |
*
|
| 38 |
* @copyright 2021 Shamim Rezaie <shamim@moodle.com>
|
38 |
* @copyright 2021 Shamim Rezaie <shamim@moodle.com>
|
| 39 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
39 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
| 40 |
*/
|
40 |
*/
|
| 41 |
class lib_test extends advanced_testcase {
|
41 |
final class lib_test extends advanced_testcase {
|
| 42 |
/**
|
42 |
/**
|
| 43 |
* Data provider for test_filter_tex_sanitize_formula.
|
43 |
* Data provider for test_filter_tex_sanitize_formula.
|
| 44 |
*
|
44 |
*
|
| 45 |
* @return array
|
45 |
* @return array
|
| 46 |
*/
|
46 |
*/
|
| 47 |
public function filter_tex_sanitize_formula_provider(): array {
|
47 |
public static function filter_tex_sanitize_formula_provider(): array {
|
| 48 |
return [
|
48 |
return [
|
| 49 |
['x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12)', 'x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12)'],
|
49 |
['x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12)', 'x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12)'],
|
| 50 |
['\usepackage[latin1]{inputenc}', '\usepackage[latin1]{inputenc}'],
|
50 |
['\usepackage[latin1]{inputenc}', '\usepackage[latin1]{inputenc}'],
|
| 51 |
['\newcommand{\A}{\verbatiminput}', '\newforbiddenkeyword_command{\A}{\verbatimforbiddenkeyword_input}'],
|
51 |
['\newcommand{\A}{\verbatiminput}', '\newforbiddenkeyword_command{\A}{\verbatimforbiddenkeyword_input}'],
|
| 52 |
['\pdffiledump offset 0 length', 'forbiddenkeyword_\pdffiledump offset 0 length'],
|
52 |
['\pdffiledump offset 0 length', 'forbiddenkeyword_pdffiledump offset 0 length'],
|
| 53 |
];
|
53 |
];
|
| 54 |
}
|
54 |
}
|
| Línea 55... |
Línea 55... |
| 55 |
|
55 |
|
| 56 |
/**
|
56 |
/**
|