X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FExtraParserTest.php;h=77b26b3bd4a60bde9922c1bc199567675f140a1e;hb=d85d5a3755bf022c615e815557f9b1ddac47dda8;hp=3cf7abdcf7d6e12d7bd7f359c8083cd44cb8b291;hpb=df1a0cc446c0a66c1424b575497a0576db7abb73;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/ExtraParserTest.php b/tests/phpunit/includes/ExtraParserTest.php index 3cf7abdcf7..77b26b3bd4 100644 --- a/tests/phpunit/includes/ExtraParserTest.php +++ b/tests/phpunit/includes/ExtraParserTest.php @@ -2,6 +2,8 @@ /** * Parser-related tests that don't suit for parserTests.txt + * + * @group Database */ class ExtraParserTest extends MediaWikiTestCase { @@ -130,8 +132,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 +151,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 +167,11 @@ class ExtraParserTest extends MediaWikiTestCase { */ public function testGetPreloadText() { $title = Title::newFromText( __FUNCTION__ ); - $outputText = $this->parser->getPreloadText( "{{Foo}} censored information ", $title, $this->options ); + $outputText = $this->parser->getPreloadText( + "{{Foo}} censored information ", + $title, + $this->options + ); $this->assertEquals( "{{Foo}} information ", $outputText ); }