aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2013-02-25 08:55:30 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2013-02-25 08:55:30 +0000
commit32b58ee1181f3ee3f295f2099100ef4279116b03 (patch)
tree1f076d0f9e984ae669db87b7f0406296311a6372 /tests/phpunit
parentdf02a74649e3f825240999b4d5843025250973a3 (diff)
parent388b14a15de6c531d876796dde02605f046fcf53 (diff)
downloadmediawikicore-32b58ee1181f3ee3f295f2099100ef4279116b03.tar.gz
mediawikicore-32b58ee1181f3ee3f295f2099100ef4279116b03.zip
Merge "Misc follow-ups to I2fc3966e (a161c5e)"
Diffstat (limited to 'tests/phpunit')
-rw-r--r--tests/phpunit/includes/ExtraParserTest.php18
-rw-r--r--tests/phpunit/includes/parser/MagicVariableTest.php61
-rw-r--r--tests/phpunit/includes/parser/TagHooksTest.php2
3 files changed, 67 insertions, 14 deletions
diff --git a/tests/phpunit/includes/ExtraParserTest.php b/tests/phpunit/includes/ExtraParserTest.php
index 067cfc4a73bb..e0e5535ac636 100644
--- a/tests/phpunit/includes/ExtraParserTest.php
+++ b/tests/phpunit/includes/ExtraParserTest.php
@@ -26,7 +26,11 @@ class ExtraParserTest extends MediaWikiTestCase {
MagicWord::clearCache();
}
- // Bug 8689 - Long numeric lines kill the parser
+ /**
+ * Bug 8689 - Long numeric lines kill the parser
+ *
+ * @group Database
+ */
function testBug8689() {
global $wgUser;
$longLine = '1.' . str_repeat( '1234567890', 100000 ) . "\n";
@@ -37,13 +41,20 @@ class ExtraParserTest extends MediaWikiTestCase {
$this->parser->parse( $longLine, $t, $options )->getText() );
}
- /* Test the parser entry points */
+ /**
+ * Test the parser entry points
+ *
+ * @group Database
+ */
function testParse() {
$title = Title::newFromText( __FUNCTION__ );
$parserOutput = $this->parser->parse( "Test\n{{Foo}}\n{{Bar}}", $title, $this->options );
$this->assertEquals( "<p>Test\nContent of <i>Template:Foo</i>\nContent of <i>Template:Bar</i>\n</p>", $parserOutput->getText() );
}
+ /**
+ * @group Database
+ */
function testPreSaveTransform() {
global $wgUser;
$title = Title::newFromText( __FUNCTION__ );
@@ -52,6 +63,9 @@ class ExtraParserTest extends MediaWikiTestCase {
$this->assertEquals( "Test\nContent of ''Template:Foo''\n{{Bar}}", $outputText );
}
+ /**
+ * @group Database
+ */
function testPreprocess() {
$title = Title::newFromText( __FUNCTION__ );
$outputText = $this->parser->preprocess( "Test\n{{Foo}}\n{{Bar}}", $title, $this->options );
diff --git a/tests/phpunit/includes/parser/MagicVariableTest.php b/tests/phpunit/includes/parser/MagicVariableTest.php
index dfcdafde35b5..51643ce4e302 100644
--- a/tests/phpunit/includes/parser/MagicVariableTest.php
+++ b/tests/phpunit/includes/parser/MagicVariableTest.php
@@ -65,44 +65,68 @@ class MagicVariableTest extends MediaWikiTestCase {
# day
- /** @dataProvider MediaWikiProvide::Days */
+ /**
+ * @dataProvider MediaWikiProvide::Days
+ * @group Database
+ */
function testCurrentdayIsUnPadded( $day ) {
$this->assertUnPadded( 'currentday', $day );
}
- /** @dataProvider MediaWikiProvide::Days */
+ /**
+ * @dataProvider MediaWikiProvide::Days
+ * @group Database
+ */
function testCurrentdaytwoIsZeroPadded( $day ) {
$this->assertZeroPadded( 'currentday2', $day );
}
- /** @dataProvider MediaWikiProvide::Days */
+ /**
+ * @dataProvider MediaWikiProvide::Days
+ * @group Database
+ */
function testLocaldayIsUnPadded( $day ) {
$this->assertUnPadded( 'localday', $day );
}
- /** @dataProvider MediaWikiProvide::Days */
+ /**
+ * @dataProvider MediaWikiProvide::Days
+ * @group Database
+ */
function testLocaldaytwoIsZeroPadded( $day ) {
$this->assertZeroPadded( 'localday2', $day );
}
# month
- /** @dataProvider MediaWikiProvide::Months */
+ /**
+ * @dataProvider MediaWikiProvide::Months
+ * @group Database
+ */
function testCurrentmonthIsZeroPadded( $month ) {
$this->assertZeroPadded( 'currentmonth', $month );
}
- /** @dataProvider MediaWikiProvide::Months */
+ /**
+ * @dataProvider MediaWikiProvide::Months
+ * @group Database
+ */
function testCurrentmonthoneIsUnPadded( $month ) {
$this->assertUnPadded( 'currentmonth1', $month );
}
- /** @dataProvider MediaWikiProvide::Months */
+ /**
+ * @dataProvider MediaWikiProvide::Months
+ * @group Database
+ */
function testLocalmonthIsZeroPadded( $month ) {
$this->assertZeroPadded( 'localmonth', $month );
}
- /** @dataProvider MediaWikiProvide::Months */
+ /**
+ * @dataProvider MediaWikiProvide::Months
+ * @group Database
+ */
function testLocalmonthoneIsUnPadded( $month ) {
$this->assertUnPadded( 'localmonth1', $month );
}
@@ -110,24 +134,36 @@ class MagicVariableTest extends MediaWikiTestCase {
# revision day
- /** @dataProvider MediaWikiProvide::Days */
+ /**
+ * @dataProvider MediaWikiProvide::Days
+ * @group Database
+ */
function testRevisiondayIsUnPadded( $day ) {
$this->assertUnPadded( 'revisionday', $day );
}
- /** @dataProvider MediaWikiProvide::Days */
+ /**
+ * @dataProvider MediaWikiProvide::Days
+ * @group Database
+ */
function testRevisiondaytwoIsZeroPadded( $day ) {
$this->assertZeroPadded( 'revisionday2', $day );
}
# revision month
- /** @dataProvider MediaWikiProvide::Months */
+ /**
+ * @dataProvider MediaWikiProvide::Months
+ * @group Database
+ */
function testRevisionmonthIsZeroPadded( $month ) {
$this->assertZeroPadded( 'revisionmonth', $month );
}
- /** @dataProvider MediaWikiProvide::Months */
+ /**
+ * @dataProvider MediaWikiProvide::Months
+ * @group Database
+ */
function testRevisionmonthoneIsUnPadded( $month ) {
$this->assertUnPadded( 'revisionmonth1', $month );
}
@@ -135,6 +171,7 @@ class MagicVariableTest extends MediaWikiTestCase {
/**
* Rough tests for {{SERVERNAME}} magic word
* Bug 31176
+ * @group Database
*/
function testServernameFromDifferentProtocols() {
global $wgServer;
diff --git a/tests/phpunit/includes/parser/TagHooksTest.php b/tests/phpunit/includes/parser/TagHooksTest.php
index ed600790e973..d643264fd048 100644
--- a/tests/phpunit/includes/parser/TagHooksTest.php
+++ b/tests/phpunit/includes/parser/TagHooksTest.php
@@ -20,6 +20,7 @@ class TagHookTest extends MediaWikiTestCase {
/**
* @dataProvider provideValidNames
+ * @group Database
*/
function testTagHooks( $tag ) {
global $wgParserConf, $wgContLang;
@@ -47,6 +48,7 @@ class TagHookTest extends MediaWikiTestCase {
/**
* @dataProvider provideValidNames
+ * @group Database
*/
function testFunctionTagHooks( $tag ) {
global $wgParserConf, $wgContLang;