From 643225cbc7009c2e04f89ae6e81fd9be0f9d716c Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Wed, 30 Jan 2019 00:23:48 -0800 Subject: [PATCH] Add some missing @covers tags Change-Id: Idb9af9515702ee9748755d7799663713b2283647 --- tests/phpunit/includes/MessageTest.php | 3 +++ tests/phpunit/includes/api/ApiErrorFormatterTest.php | 5 +++++ tests/phpunit/includes/content/MessageContentTest.php | 1 + tests/phpunit/includes/content/TextContentTest.php | 4 ++++ .../phpunit/includes/content/WikitextContentHandlerTest.php | 6 ++++++ .../phpunit/includes/password/PasswordPolicyChecksTest.php | 1 + 6 files changed, 20 insertions(+) diff --git a/tests/phpunit/includes/MessageTest.php b/tests/phpunit/includes/MessageTest.php index d75c0e5410..5d77cebac8 100644 --- a/tests/phpunit/includes/MessageTest.php +++ b/tests/phpunit/includes/MessageTest.php @@ -400,6 +400,9 @@ class MessageTest extends MediaWikiLangTestCase { $this->assertSame( 'example &', $msg->escaped() ); } + /** + * @covers CoreTagHooks::html + */ public function testRawHtmlInMsg() { $this->setMwGlobals( 'wgRawHtml', true ); // We have to reset the core hook registration. diff --git a/tests/phpunit/includes/api/ApiErrorFormatterTest.php b/tests/phpunit/includes/api/ApiErrorFormatterTest.php index d7628e0ccf..2eec176bfc 100644 --- a/tests/phpunit/includes/api/ApiErrorFormatterTest.php +++ b/tests/phpunit/includes/api/ApiErrorFormatterTest.php @@ -634,6 +634,11 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase { ]; } + /** + * @covers ApiErrorFormatter::addMessagesFromStatus + * @covers ApiErrorFormatter::addWarningOrError + * @covers ApiErrorFormatter::formatMessageInternal + */ public function testAddMessagesFromStatus_filter() { $result = new ApiResult( 8388608 ); $formatter = new ApiErrorFormatter( $result, Language::factory( 'qqx' ), 'plaintext', false ); diff --git a/tests/phpunit/includes/content/MessageContentTest.php b/tests/phpunit/includes/content/MessageContentTest.php index 60f68e76cc..5df7cca444 100644 --- a/tests/phpunit/includes/content/MessageContentTest.php +++ b/tests/phpunit/includes/content/MessageContentTest.php @@ -2,6 +2,7 @@ /** * @group ContentHandler + * @covers MessageContent */ class MessageContentTest extends MediaWikiLangTestCase { diff --git a/tests/phpunit/includes/content/TextContentTest.php b/tests/phpunit/includes/content/TextContentTest.php index 8e537d684a..ecd23f1338 100644 --- a/tests/phpunit/includes/content/TextContentTest.php +++ b/tests/phpunit/includes/content/TextContentTest.php @@ -487,6 +487,10 @@ class TextContentTest extends MediaWikiLangTestCase { ]; } + /** + * @covers TextContent::__construct + * @covers TextContentHandler::serializeContent + */ public function testSerialize() { $cnt = $this->newContent( 'testing text' ); diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/includes/content/WikitextContentHandlerTest.php index 5f78a5c00c..b372e37c9f 100644 --- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php @@ -366,6 +366,9 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase { $this->assertEquals( 'This is file content', $data['file_text'] ); } + /** + * @covers ContentHandler::getSecondaryDataUpdates + */ public function testGetSecondaryDataUpdates() { $title = Title::newFromText( 'Somefile.jpg', NS_FILE ); $content = new WikitextContent( '' ); @@ -379,6 +382,9 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase { $this->assertEquals( [], $updates ); } + /** + * @covers ContentHandler::getDeletionUpdates + */ public function testGetDeletionUpdates() { $title = Title::newFromText( 'Somefile.jpg', NS_FILE ); $content = new WikitextContent( '' ); diff --git a/tests/phpunit/includes/password/PasswordPolicyChecksTest.php b/tests/phpunit/includes/password/PasswordPolicyChecksTest.php index 9f9824f8b7..457030fe5c 100644 --- a/tests/phpunit/includes/password/PasswordPolicyChecksTest.php +++ b/tests/phpunit/includes/password/PasswordPolicyChecksTest.php @@ -181,6 +181,7 @@ class PasswordPolicyChecksTest extends MediaWikiTestCase { /** * Verify that all password policy description messages actually exist. * Messages used on Special:PasswordPolicies + * @coversNothing */ public function testPasswordPolicyDescriptionsExist() { global $wgPasswordPolicy; -- 2.20.1