Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 37... Línea 37...
37
 * @author Josep Arus
37
 * @author Josep Arus
38
 * @author Kenneth Riba
38
 * @author Kenneth Riba
39
 *
39
 *
40
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
40
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
41
 */
41
 */
42
class wikiparser_test extends \advanced_testcase {
42
final class wikiparser_test extends \advanced_testcase {
Línea 43... Línea 43...
43
 
43
 
44
    /**
44
    /**
45
     * URL inside the clickable text of some link should not be turned into a new link via the url_tag_rule.
45
     * URL inside the clickable text of some link should not be turned into a new link via the url_tag_rule.
46
     *
46
     *
Línea 62... Línea 62...
62
    /**
62
    /**
63
     * Provides data sets for {@see self::test_urls_inside_link_text()}.
63
     * Provides data sets for {@see self::test_urls_inside_link_text()}.
64
     *
64
     *
65
     * @return array
65
     * @return array
66
     */
66
     */
67
    public function urls_inside_link_text_provider() {
67
    public static function urls_inside_link_text_provider(): array {
68
        return [
68
        return [
69
            'creole implicit link' => [
69
            'creole implicit link' => [
70
                'markup' => 'creole',
70
                'markup' => 'creole',
71
                'input' => 'Visit https://site.url for more information.',
71
                'input' => 'Visit https://site.url for more information.',
72
                'output' => 'Visit <a href="https://site.url">https://site.url</a> for more information.',
72
                'output' => 'Visit <a href="https://site.url">https://site.url</a> for more information.',
Línea 361... Línea 361...
361
     * @return array[]
361
     * @return array[]
362
     */
362
     */
363
    public static function format_parser_provider(): array {
363
    public static function format_parser_provider(): array {
364
        return [
364
        return [
365
            'creole' => [
365
            'creole' => [
366
                'data' => 'creole',
366
                'format' => 'creole',
367
                'expected' => 'creole',
367
                'expected' => 'creole',
368
            ],
368
            ],
369
            'html' => [
369
            'html' => [
370
                'data' => 'html',
370
                'format' => 'html',
371
                'expected' => 'html',
371
                'expected' => 'html',
372
            ],
372
            ],
373
            'wikimarkup' => [
373
            'wikimarkup' => [
374
                'data' => 'nwiki',
374
                'format' => 'nwiki',
375
                'expected' => 'nwiki',
375
                'expected' => 'nwiki',
376
            ],
376
            ],
377
            'wrong format' => [
377
            'wrong format' => [
378
                'data' => '../wrongformat123',
378
                'format' => '../wrongformat123',
379
                'expected' => 'exception',
379
                'expected' => 'exception',
380
            ],
380
            ],
381
        ];
381
        ];
382
    }
382
    }
383
}
383
}