/**
* @covers WikiPage::doEditContent
+ * @covers WikiPage::doModify
+ * @covers WikiPage::doCreate
+ * @covers WikiPage::doEditUpdates
*/
public function testDoEditContent() {
$page = $this->newPage( "WikiPageTest_testDoEditContent" );
/**
* @covers WikiPage::doEdit
+ * @deprecated since 1.21. Should be removed when WikiPage::doEdit() gets removed
*/
public function testDoEdit() {
$this->hideDeprecated( "WikiPage::doEdit" );
$this->assertEquals( 2, $n, 'pagelinks should contain two links from the page' );
}
- /**
- * @covers WikiPage::doQuickEditContent
- */
- public function testDoQuickEditContent() {
- global $wgUser;
-
- $page = $this->createPage(
- "WikiPageTest_testDoQuickEditContent",
- "original text",
- CONTENT_MODEL_WIKITEXT
- );
-
- $content = ContentHandler::makeContent(
- "quick text",
- $page->getTitle(),
- CONTENT_MODEL_WIKITEXT
- );
- $page->doQuickEditContent( $content, $wgUser, "testing q" );
-
- # ---------------------
- $page = new WikiPage( $page->getTitle() );
- $this->assertTrue( $content->equals( $page->getContent() ) );
- }
-
/**
* @covers WikiPage::doDeleteArticle
*/
];
}
- /**
- * @dataProvider dataReplaceSection
- * @covers WikiPage::replaceSection
- */
- public function testReplaceSection( $title, $model, $text, $section, $with,
- $sectionTitle, $expected
- ) {
- $this->hideDeprecated( "WikiPage::replaceSection" );
-
- $page = $this->createPage( $title, $text, $model );
- $text = $page->replaceSection( $section, $with, $sectionTitle );
- $text = trim( $text );
-
- $this->assertEquals( $expected, $text );
- }
-
/**
* @dataProvider dataReplaceSection
* @covers WikiPage::replaceSectionContent