*/
public function testReplaceSection( $text, $section, $with, $sectionTitle, $expected ) {
$content = $this->newContent( $text );
+ /** @var WikitextContent $c */
$c = $content->replaceSection( $section, $this->newContent( $with ), $sectionTitle );
- $this->assertEquals( $expected, is_null( $c ) ? null : $c->getText() );
+ $this->assertEquals( $expected, $c ? $c->getText() : null );
}
/**
$this->assertEquals( CONTENT_MODEL_WIKITEXT, $content->getContentHandler()->getModelID() );
}
+ /**
+ * @covers ParserOptions::getRedirectTarget
+ * @covers ParserOptions::setRedirectTarget
+ */
public function testRedirectParserOption() {
$title = Title::newFromText( 'testRedirectParserOption' );