Add @covers tags to miscellaneous tests (#2)
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 28 Dec 2017 08:22:35 +0000 (00:22 -0800)
committerLegoktm <legoktm@member.fsf.org>
Thu, 28 Dec 2017 08:52:48 +0000 (08:52 +0000)
Change-Id: I9116598bee4f4917e02290d273644c13475ff721

tests/phpunit/includes/AutopromoteTest.php
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/exception/MWExceptionTest.php
tests/phpunit/includes/media/ExifRotationTest.php
tests/phpunit/includes/parser/MagicVariableTest.php
tests/phpunit/skins/SideBarTest.php

index 785aa4e..24f6596 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @covers Autopromote
+ */
 class AutopromoteTest extends MediaWikiTestCase {
        /**
         * T157718: Verify Autopromote does not perform edit count lookup if requirement is 0 or invalid
index 70715e2..b765494 100644 (file)
@@ -81,6 +81,7 @@ class BlockTest extends MediaWikiLangTestCase {
 
        /**
         * per T28425
+        * @covers Block::__construct
         */
        public function testBug26425BlockTimestampDefaultsToTime() {
                $user = $this->getUserForBlocking();
@@ -366,6 +367,9 @@ class BlockTest extends MediaWikiLangTestCase {
                $this->assertEquals( $exResult, $block->mReason, 'Correct block type for XFF header ' . $xff );
        }
 
+       /**
+        * @covers Block::__construct
+        */
        public function testDeprecatedConstructor() {
                $this->hideDeprecated( 'Block::__construct with multiple arguments' );
                $username = 'UnthinkablySecretRandomUsername';
@@ -418,6 +422,11 @@ class BlockTest extends MediaWikiLangTestCase {
                );
        }
 
+       /**
+        * @covers Block::getSystemBlockType
+        * @covers Block::insert
+        * @covers Block::doAutoblock
+        */
        public function testSystemBlocks() {
                $user = $this->getUserForBlocking();
                $this->addBlockForUser( $user );
index 614a1c9..6c5b3b1 100644 (file)
@@ -10,6 +10,7 @@ class MWExceptionTest extends MediaWikiTestCase {
 
        /**
         * @expectedException MWException
+        * @covers MWException
         */
        public function testMwexceptionThrowing() {
                throw new MWException();
index 5ae1763..fff101f 100644 (file)
@@ -5,10 +5,13 @@
  * @group Media
  * @group medium
  *
- * @todo covers tags
+ * @covers BitmapHandler
  */
 class ExifRotationTest extends MediaWikiMediaTestCase {
 
+       /** @var BitmapHandler */
+       private $handler;
+
        protected function setUp() {
                parent::setUp();
                $this->checkPHPExtension( 'exif' );
index 6a2afad..9f5e386 100644 (file)
@@ -9,11 +9,13 @@
  * @author Antoine Musso
  * @copyright Copyright © 2011, Antoine Musso
  * @file
- * @todo covers tags
  *
  * @group Database
  */
 
+/**
+ * @covers Parser::getVariableValue
+ */
 class MagicVariableTest extends MediaWikiTestCase {
        /**
         * @var Parser
index af03fe6..dceaf41 100644 (file)
@@ -188,6 +188,7 @@ class SideBarTest extends MediaWikiLangTestCase {
 
        /**
         * Test $wgNoFollowLinks in sidebar
+        * @covers Skin::addToSidebarPlain
         */
        public function testRespectWgnofollowlinks() {
                $this->setMwGlobals( 'wgNoFollowLinks', false );
@@ -201,6 +202,7 @@ class SideBarTest extends MediaWikiLangTestCase {
        /**
         * Test $wgExternaLinkTarget in sidebar
         * @dataProvider dataRespectExternallinktarget
+        * @covers Skin::addToSidebarPlain
         */
        public function testRespectExternallinktarget( $externalLinkTarget ) {
                $this->setMwGlobals( 'wgExternalLinkTarget', $externalLinkTarget );