LocalisationCache: try harder to use LCStoreCDB
[lhc/web/wiklou.git] / tests / phpunit / includes / ExtraParserTest.php
index 3cf7abd..7b60fb3 100644 (file)
@@ -2,6 +2,8 @@
 
 /**
  * Parser-related tests that don't suit for parserTests.txt
+ *
+ * @group Database
  */
 class ExtraParserTest extends MediaWikiTestCase {
 
@@ -20,7 +22,6 @@ class ExtraParserTest extends MediaWikiTestCase {
                        'wgContLang' => $contLang,
                        'wgLang' => Language::factory( 'en' ),
                        'wgMemc' => new EmptyBagOStuff,
-                       'wgAlwaysUseTidy' => false,
                        'wgCleanSignatures' => true,
                ) );
 
@@ -130,8 +131,16 @@ class ExtraParserTest extends MediaWikiTestCase {
         * @covers Parser::getSection
         */
        public function testGetSection() {
-               $outputText2 = $this->parser->getSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 2 );
-               $outputText1 = $this->parser->getSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 1 );
+               $outputText2 = $this->parser->getSection(
+                       "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\n"
+                               . "Section 2\n== Heading 3 ==\nSection 3\n",
+                       2
+               );
+               $outputText1 = $this->parser->getSection(
+                       "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\n"
+                               . "Section 2\n== Heading 3 ==\nSection 3\n",
+                       1
+               );
 
                $this->assertEquals( "=== Heading 2 ===\nSection 2", $outputText2 );
                $this->assertEquals( "== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2", $outputText1 );
@@ -141,7 +150,12 @@ class ExtraParserTest extends MediaWikiTestCase {
         * @covers Parser::replaceSection
         */
        public function testReplaceSection() {
-               $outputText = $this->parser->replaceSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 1, "New section 1" );
+               $outputText = $this->parser->replaceSection(
+                       "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\n"
+                               . "Section 2\n== Heading 3 ==\nSection 3\n",
+                       1,
+                       "New section 1"
+               );
 
                $this->assertEquals( "Section 0\nNew section 1\n\n== Heading 3 ==\nSection 3", $outputText );
        }
@@ -152,7 +166,11 @@ class ExtraParserTest extends MediaWikiTestCase {
         */
        public function testGetPreloadText() {
                $title = Title::newFromText( __FUNCTION__ );
-               $outputText = $this->parser->getPreloadText( "{{Foo}}<noinclude> censored</noinclude> information <!-- is very secret -->", $title, $this->options );
+               $outputText = $this->parser->getPreloadText(
+                       "{{Foo}}<noinclude> censored</noinclude> information <!-- is very secret -->",
+                       $title,
+                       $this->options
+               );
 
                $this->assertEquals( "{{Foo}} information <!-- is very secret -->", $outputText );
        }