| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
class CssContentHandlerIntegrationTest extends TextContentHandlerIntegrationTest { |
| 10 |
public static function provideGetParserOutput() { |
| 11 |
yield 'Basic render' => [ |
| 12 |
'title' => 'MediaWiki:Test.css', |
| 13 |
'model' => null, |
| 14 |
'text' => "hello <world>x\n", |
| 15 |
'expectedHtml' => "<pre class=\"mw-code mw-css\" dir=\"ltr\">hello <world>x\n\n</pre>", |
| 16 |
'expectedFields' => [ |
| 17 |
'Links' => [ |
| 18 |
], |
| 19 |
'Sections' => [ |
| 20 |
], |
| 21 |
], |
| 22 |
]; |
| 23 |
yield 'Links' => [ |
| 24 |
'title' => 'MediaWiki:Test.css', |
| 25 |
'model' => null, |
| 26 |
'text' => "/* hello [[world]] */\n", |
| 27 |
'expectedHtml' => "<pre class=\"mw-code mw-css\" dir=\"ltr\">/* hello [[world]] */\n\n</pre>", |
| 28 |
'expectedFields' => [ |
| 29 |
'Links' => [ |
| 30 |
[ 'World' => 0, ], |
| 31 |
], |
| 32 |
'Sections' => [ |
| 33 |
], |
| 34 |
], |
| 35 |
]; |
| 36 |
yield 'TOC' => [ |
| 37 |
'title' => 'MediaWiki:Test.css', |
| 38 |
'model' => null, |
| 39 |
'text' => "==One==\n<h2>Two</h2>", |
| 40 |
'expectedHtml' => "<pre class=\"mw-code mw-css\" dir=\"ltr\">==One==\n<h2>Two</h2>\n</pre>", |
| 41 |
'expectedFields' => [ |
| 42 |
'Links' => [ |
| 43 |
], |
| 44 |
|
| 45 |
'Sections' => [ |
| 46 |
], |
| 47 |
] |
| 48 |
]; |
| 49 |
} |
| 50 |
} |