summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/content/WikitextContentTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/content/WikitextContentTest.php')
-rw-r--r--tests/phpunit/includes/content/WikitextContentTest.php24
1 files changed, 21 insertions, 3 deletions
diff --git a/tests/phpunit/includes/content/WikitextContentTest.php b/tests/phpunit/includes/content/WikitextContentTest.php
index c9eecf7f..9f20073d 100644
--- a/tests/phpunit/includes/content/WikitextContentTest.php
+++ b/tests/phpunit/includes/content/WikitextContentTest.php
@@ -64,6 +64,7 @@ more stuff
/**
* @dataProvider dataGetSecondaryDataUpdates
* @group Database
+ * @covers WikitextContent::getSecondaryDataUpdates
*/
public function testGetSecondaryDataUpdates( $title, $model, $text, $expectedStuff ) {
$ns = $this->getDefaultWikitextNS();
@@ -116,6 +117,7 @@ just a test"
/**
* @dataProvider dataGetSection
+ * @covers WikitextContent::getSection
*/
public function testGetSection( $text, $sectionId, $expectedText ) {
$content = $this->newContent( $text );
@@ -167,6 +169,7 @@ just a test"
/**
* @dataProvider dataReplaceSection
+ * @covers WikitextContent::replaceSection
*/
public function testReplaceSection( $text, $section, $with, $sectionTitle, $expected ) {
$content = $this->newContent( $text );
@@ -175,6 +178,9 @@ just a test"
$this->assertEquals( $expected, is_null( $c ) ? null : $c->getNativeData() );
}
+ /**
+ * @covers WikitextContent::addSectionHeader
+ */
public function testAddSectionHeader() {
$content = $this->newContent( 'hello world' );
$content = $content->addSectionHeader( 'test' );
@@ -240,7 +246,7 @@ just a test"
}
/**
- * @todo: test needs database! Should be done by a test class in the Database group.
+ * @todo Test needs database! Should be done by a test class in the Database group.
*/
/*
public function getRedirectChain() {
@@ -250,7 +256,7 @@ just a test"
*/
/**
- * @todo: test needs database! Should be done by a test class in the Database group.
+ * @todo Test needs database! Should be done by a test class in the Database group.
*/
/*
public function getUltimateRedirectTarget() {
@@ -319,6 +325,9 @@ just a test"
);
}
+ /**
+ * @covers WikitextContent::matchMagicWord
+ */
public function testMatchMagicWord() {
$mw = MagicWord::get( "staticredirect" );
@@ -329,6 +338,9 @@ just a test"
$this->assertFalse( $content->matchMagicWord( $mw ), "should not have matched magic word" );
}
+ /**
+ * @covers WikitextContent::updateRedirect
+ */
public function testUpdateRedirect() {
$target = Title::newFromText( "testUpdateRedirect_target" );
@@ -348,12 +360,18 @@ just a test"
$this->assertEquals( $target->getFullText(), $newContent->getRedirectTarget()->getFullText() );
}
+ /**
+ * @covers WikitextContent::getModel
+ */
public function testGetModel() {
$content = $this->newContent( "hello world." );
$this->assertEquals( CONTENT_MODEL_WIKITEXT, $content->getModel() );
}
+ /**
+ * @covers WikitextContent::getContentHandler
+ */
public function testGetContentHandler() {
$content = $this->newContent( "hello world." );
@@ -380,7 +398,7 @@ just a test"
CONTENT_MODEL_WIKITEXT, "hello [[world test 21344]]\n",
array( 'LinksDeletionUpdate' => array() )
),
- // @todo: more...?
+ // @todo more...?
);
}
}