summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/content/JavaScriptContentTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /tests/phpunit/includes/content/JavaScriptContentTest.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'tests/phpunit/includes/content/JavaScriptContentTest.php')
-rw-r--r--tests/phpunit/includes/content/JavaScriptContentTest.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/phpunit/includes/content/JavaScriptContentTest.php b/tests/phpunit/includes/content/JavaScriptContentTest.php
index 2d693feb..c8616ff0 100644
--- a/tests/phpunit/includes/content/JavaScriptContentTest.php
+++ b/tests/phpunit/includes/content/JavaScriptContentTest.php
@@ -89,6 +89,9 @@ class JavaScriptContentTest extends TextContentTest {
);
}
+ /**
+ * @covers JavaScriptContent::addSectionHeader
+ */
public function testAddSectionHeader() {
$content = $this->newContent( 'hello world' );
$c = $content->addSectionHeader( 'test' );
@@ -137,7 +140,7 @@ class JavaScriptContentTest extends TextContentTest {
}
/**
- * @todo: test needs database!
+ * @todo Test needs database!
*/
/*
public function getRedirectChain() {
@@ -147,7 +150,7 @@ class JavaScriptContentTest extends TextContentTest {
*/
/**
- * @todo: test needs database!
+ * @todo Test needs database!
*/
/*
public function getUltimateRedirectTarget() {
@@ -233,6 +236,9 @@ class JavaScriptContentTest extends TextContentTest {
);
}
+ /**
+ * @covers JavaScriptContent::matchMagicWord
+ */
public function testMatchMagicWord() {
$mw = MagicWord::get( "staticredirect" );
@@ -240,6 +246,9 @@ class JavaScriptContentTest extends TextContentTest {
$this->assertFalse( $content->matchMagicWord( $mw ), "should not have matched magic word, since it's not wikitext" );
}
+ /**
+ * @covers JavaScriptContent::updateRedirect
+ */
public function testUpdateRedirect() {
$target = Title::newFromText( "testUpdateRedirect_target" );
@@ -249,12 +258,18 @@ class JavaScriptContentTest extends TextContentTest {
$this->assertTrue( $content->equals( $newContent ), "content should be unchanged since it's not wikitext" );
}
+ /**
+ * @covers JavaScriptContent::getModel
+ */
public function testGetModel() {
$content = $this->newContent( "hello world." );
$this->assertEquals( CONTENT_MODEL_JAVASCRIPT, $content->getModel() );
}
+ /**
+ * @covers JavaScriptContent::getContentHandler
+ */
public function testGetContentHandler() {
$content = $this->newContent( "hello world." );
@@ -269,5 +284,4 @@ class JavaScriptContentTest extends TextContentTest {
array( new JavaScriptContent( "hallo" ), new JavaScriptContent( "HALLO" ), false ),
);
}
-
}