Merge "mediawiki.content.json: Remove file and author annotations"
[mediawiki.git] / tests / phpunit / includes / content / CssContentHandlerIntegrationTest.php
blob74e654dde08f4df0b6b5808cc3d6d1ba84ebf3ed
1 <?php
3 /**
4 * @group ContentHandler
5 * @group Database
6 * ^--- needed, because we do need the database to test link updates
7 * @covers \MediaWiki\Content\CssContentHandler
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 &lt;world&gt;x\n\n</pre>",
16 'expectedFields' => [
17 'Links' => [
19 'Sections' => [
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, ],
32 'Sections' => [
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&lt;h2&gt;Two&lt;/h2&gt;\n</pre>",
41 'expectedFields' => [
42 'Links' => [
44 # T307691
45 'Sections' => [