$sectionContent = $content->getSection( $sectionId );
if ( is_object( $sectionContent ) ) {
- $sectionText = $sectionContent->getNativeData();
+ $sectionText = $sectionContent->getText();
} else {
$sectionText = $sectionContent;
}
$content = $this->newContent( $text );
$c = $content->replaceSection( $section, $this->newContent( $with ), $sectionTitle );
- $this->assertEquals( $expected, is_null( $c ) ? null : $c->getNativeData() );
+ $this->assertEquals( $expected, is_null( $c ) ? null : $c->getText() );
}
/**
$content = $this->newContent( 'hello world' );
$content = $content->addSectionHeader( 'test' );
- $this->assertEquals( "== test ==\n\nhello world", $content->getNativeData() );
+ $this->assertEquals( "== test ==\n\nhello world", $content->getText() );
}
public static function dataPreSaveTransform() {
$this->assertEquals( CONTENT_MODEL_WIKITEXT, $content->getContentHandler()->getModelID() );
}
+ /**
+ * @covers ParserOptions::getRedirectTarget
+ * @covers ParserOptions::setRedirectTarget
+ */
public function testRedirectParserOption() {
$title = Title::newFromText( 'testRedirectParserOption' );
public static function dataGetDeletionUpdates() {
return [
- [ "WikitextContentTest_testGetSecondaryDataUpdates_1",
+ [
CONTENT_MODEL_WIKITEXT, "hello ''world''\n",
[ LinksDeletionUpdate::class => [] ]
],
- [ "WikitextContentTest_testGetSecondaryDataUpdates_2",
+ [
CONTENT_MODEL_WIKITEXT, "hello [[world test 21344]]\n",
[ LinksDeletionUpdate::class => [] ]
],