From caec5f920abd1854b492e8ca4baa8cb7db3e662a Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 24 Oct 2013 21:30:43 +0100 Subject: [PATCH] @covers tags for the rest of test files.. Change-Id: I0fafe80531325a412472ab7c9fc6d81c861b3751 --- tests/phpunit/includes/TitlePermissionTest.php | 4 +++- tests/phpunit/includes/parser/TagHooksTest.php | 4 ++++ tests/phpunit/includes/search/SearchUpdateTest.php | 6 ++++++ tests/phpunit/includes/specials/SpecialPreferencesTest.php | 3 +++ .../phpunit/includes/specials/SpecialRecentchangesTest.php | 2 ++ tests/phpunit/includes/upload/UploadFromUrlTest.php | 4 ++++ tests/phpunit/includes/upload/UploadStashTest.php | 2 ++ tests/phpunit/languages/LanguageTrTest.php | 2 ++ .../phpunit/languages/utils/CLDRPluralRuleEvaluatorTest.php | 3 +++ 9 files changed, 29 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/TitlePermissionTest.php b/tests/phpunit/includes/TitlePermissionTest.php index f15c177226..4a0a755e90 100644 --- a/tests/phpunit/includes/TitlePermissionTest.php +++ b/tests/phpunit/includes/TitlePermissionTest.php @@ -2,7 +2,9 @@ /** * @group Database - * @todo covers tags + * + * @covers Title::getUserPermissionsErrors + * @covers Title::getUserPermissionsErrorsInternal */ class TitlePermissionTest extends MediaWikiLangTestCase { diff --git a/tests/phpunit/includes/parser/TagHooksTest.php b/tests/phpunit/includes/parser/TagHooksTest.php index 61cbe45daa..259a9e2a36 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 + * @covers Parser::setHook */ public function testTagHooks( $tag ) { global $wgParserConf, $wgContLang; @@ -35,6 +36,7 @@ class TagHookTest extends MediaWikiTestCase { /** * @dataProvider provideBadNames * @expectedException MWException + * @covers Parser::setHook */ public function testBadTagHooks( $tag ) { global $wgParserConf, $wgContLang; @@ -47,6 +49,7 @@ class TagHookTest extends MediaWikiTestCase { /** * @dataProvider provideValidNames + * @covers Parser::setFunctionTagHook */ public function testFunctionTagHooks( $tag ) { global $wgParserConf, $wgContLang; @@ -62,6 +65,7 @@ class TagHookTest extends MediaWikiTestCase { /** * @dataProvider provideBadNames * @expectedException MWException + * @covers Parser::setFunctionTagHook */ public function testBadFunctionTagHooks( $tag ) { global $wgParserConf, $wgContLang; diff --git a/tests/phpunit/includes/search/SearchUpdateTest.php b/tests/phpunit/includes/search/SearchUpdateTest.php index 2f4fd501b1..b913af80ec 100644 --- a/tests/phpunit/includes/search/SearchUpdateTest.php +++ b/tests/phpunit/includes/search/SearchUpdateTest.php @@ -30,6 +30,9 @@ class SearchUpdateTest extends MediaWikiTestCase { return trim( SearchUpdate::updateText( $text ) ); } + /** + * @covers SearchUpdate::updateText + */ public function testUpdateText() { $this->assertEquals( 'test', @@ -62,6 +65,9 @@ EOT ); } + /** + * @covers SearchUpdate::updateText + */ public function testBug32712() { $text = "text „http://example.com“ text"; $result = $this->updateText( $text ); diff --git a/tests/phpunit/includes/specials/SpecialPreferencesTest.php b/tests/phpunit/includes/specials/SpecialPreferencesTest.php index 6c637c6510..8a92dafe93 100644 --- a/tests/phpunit/includes/specials/SpecialPreferencesTest.php +++ b/tests/phpunit/includes/specials/SpecialPreferencesTest.php @@ -7,6 +7,9 @@ * */ +/** + * @covers SpecialPreferences + */ class SpecialPreferencesTest extends MediaWikiTestCase { /** diff --git a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php index 436eb2e2b5..b1ba152df8 100644 --- a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php +++ b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php @@ -6,6 +6,8 @@ * * @author Antoine Musso * @group Database + * + * @covers SpecialRecentChanges */ class SpecialRecentchangesTest extends MediaWikiTestCase { diff --git a/tests/phpunit/includes/upload/UploadFromUrlTest.php b/tests/phpunit/includes/upload/UploadFromUrlTest.php index a75fba69f1..e6806327bd 100644 --- a/tests/phpunit/includes/upload/UploadFromUrlTest.php +++ b/tests/phpunit/includes/upload/UploadFromUrlTest.php @@ -4,6 +4,8 @@ * @group Broken * @group Upload * @group Database + * + * @covers UploadFromUrl */ class UploadFromUrlTest extends ApiTestCase { protected function setUp() { @@ -48,6 +50,8 @@ class UploadFromUrlTest extends ApiTestCase { /** * @todo Document why we test login, since the $wgUser hack used doesn't * require login + * + * @coversNothing */ public function testLogin() { $data = $this->doApiRequest( array( diff --git a/tests/phpunit/includes/upload/UploadStashTest.php b/tests/phpunit/includes/upload/UploadStashTest.php index 7a0fea48fc..1c89377d95 100644 --- a/tests/phpunit/includes/upload/UploadStashTest.php +++ b/tests/phpunit/includes/upload/UploadStashTest.php @@ -1,6 +1,8 @@