Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 47... Línea 47...
47
     * @dataProvider urls_inside_link_text_provider
47
     * @dataProvider urls_inside_link_text_provider
48
     * @param string $markup Markup of the Wiki page the text is part of.
48
     * @param string $markup Markup of the Wiki page the text is part of.
49
     * @param string $input The input text.
49
     * @param string $input The input text.
50
     * @param string $output The expected output HTML as a result of the parsed input text.
50
     * @param string $output The expected output HTML as a result of the parsed input text.
51
     */
51
     */
52
    public function test_urls_inside_link_text(string $markup, string $input, string $output) {
52
    public function test_urls_inside_link_text(string $markup, string $input, string $output): void {
Línea 53... Línea 53...
53
 
53
 
54
        $parsingresult = wiki_parser_proxy::parse($input, $markup, [
54
        $parsingresult = wiki_parser_proxy::parse($input, $markup, [
55
            'link_callback' => '/mod/wiki/locallib.php:wiki_parser_link',
55
            'link_callback' => '/mod/wiki/locallib.php:wiki_parser_link',
56
            'link_callback_args' => ['swid' => 1],
56
            'link_callback_args' => ['swid' => 1],
Línea 169... Línea 169...
169
     * - The heading itself is well displayed,
169
     * - The heading itself is well displayed,
170
     * - The TOC heading is well display,
170
     * - The TOC heading is well display,
171
     * - The edit link points to the right page,
171
     * - The edit link points to the right page,
172
     * - The links properly works with get_section.
172
     * - The links properly works with get_section.
173
     */
173
     */
174
    public function test_special_headings() {
174
    public function test_special_headings(): void {
Línea 175... Línea 175...
175
 
175
 
Línea 176... Línea 176...
176
        // First testing HTML markup.
176
        // First testing HTML markup.
177
 
177
 
Línea 338... Línea 338...
338
     * @param string $format
338
     * @param string $format
339
     * @param string $expected
339
     * @param string $expected
340
     * @covers \wiki_parser_proxy::parse
340
     * @covers \wiki_parser_proxy::parse
341
     * @dataProvider format_parser_provider
341
     * @dataProvider format_parser_provider
342
     */
342
     */
343
    public function test_format_parser(string $format, string $expected) {
343
    public function test_format_parser(string $format, string $expected): void {
344
        $this->resetAfterTest();
344
        $this->resetAfterTest();
345
        $this->setAdminUser();
345
        $this->setAdminUser();
346
        $generator = $this->getDataGenerator();
346
        $generator = $this->getDataGenerator();
347
        $course = $generator->create_course();
347
        $course = $generator->create_course();
348
        $wiki = $generator->create_module('wiki', array_merge(['course' => $course->id, 'defaultformat' => $format]));
348
        $wiki = $generator->create_module('wiki', array_merge(['course' => $course->id, 'defaultformat' => $format]));