Merge "Add @covers tags to miscellaneous tests"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 27 Dec 2017 17:40:44 +0000 (17:40 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 27 Dec 2017 17:40:45 +0000 (17:40 +0000)
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/LinkFilterTest.php
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/PagePropsTest.php
tests/phpunit/includes/RevisionDbTestBase.php
tests/phpunit/includes/TitleMethodsTest.php
tests/phpunit/includes/TitleTest.php
tests/phpunit/includes/poolcounter/PoolCounterTest.php
tests/phpunit/includes/upload/UploadBaseTest.php

index d961e41..9d56150 100644 (file)
@@ -752,6 +752,9 @@ class GlobalTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers ::wfMemcKey
+        */
        public function testWfMemcKey() {
                $cache = ObjectCache::getLocalClusterInstance();
                $this->assertEquals(
@@ -760,6 +763,9 @@ class GlobalTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers ::wfForeignMemcKey
+        */
        public function testWfForeignMemcKey() {
                $cache = ObjectCache::getLocalClusterInstance();
                $keyspace = $this->readAttribute( $cache, 'keyspace' );
@@ -769,6 +775,9 @@ class GlobalTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers ::wfGlobalCacheKey
+        */
        public function testWfGlobalCacheKey() {
                $cache = ObjectCache::getLocalClusterInstance();
                $this->assertEquals(
index e867f5e..7e32770 100644 (file)
@@ -386,6 +386,9 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers Html::namespaceSelector
+        */
        public function testCanFilterOutNamespaces() {
                $this->assertEquals(
                        '<select id="namespace" name="namespace">' . "\n" .
@@ -408,6 +411,9 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers Html::namespaceSelector
+        */
        public function testCanDisableANamespaces() {
                $this->assertEquals(
                        '<select id="namespace" name="namespace">' . "\n" .
@@ -678,6 +684,9 @@ class HtmlTest extends MediaWikiTestCase {
                return $ret;
        }
 
+       /**
+        * @covers Html::input
+        */
        public function testWrapperInput() {
                $this->assertEquals(
                        '<input type="radio" value="testval" name="testname"/>',
@@ -691,6 +700,9 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers Html::check
+        */
        public function testWrapperCheck() {
                $this->assertEquals(
                        '<input type="checkbox" value="1" name="testname"/>',
@@ -709,6 +721,9 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers Html::radio
+        */
        public function testWrapperRadio() {
                $this->assertEquals(
                        '<input type="radio" value="1" name="testname"/>',
@@ -727,6 +742,9 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
+       /**
+        * @covers Html::label
+        */
        public function testWrapperLabel() {
                $this->assertEquals(
                        '<label for="testid">testlabel</label>',
index ed4958f..51b54d2 100644 (file)
@@ -3,6 +3,7 @@
 use Wikimedia\Rdbms\LikeMatch;
 
 /**
+ * @covers LinkFilter
  * @group Database
  */
 class LinkFilterTest extends MediaWikiLangTestCase {
index d5948ed..c348834 100644 (file)
@@ -525,7 +525,7 @@ class OutputPageTest extends MediaWikiTestCase {
                $this->assertTrue( $outputPage->haveCacheVaryCookies() );
        }
 
-       /*
+       /**
         * @covers OutputPage::addCategoryLinks
         * @covers OutputPage::getCategories
         */
index c96d987..f602cda 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
 /**
+ * @covers PageProps
+ *
  * @group Database
  *     ^--- tell jenkins this test needs the database
  *
index 9ab76c8..94f8fba 100644 (file)
@@ -649,6 +649,7 @@ abstract class RevisionDbTestBase extends MediaWikiTestCase {
        }
 
        /**
+        * @covers Revision::userWasLastToEdit
         * @dataProvider provideUserWasLastToEdit
         */
        public function testUserWasLastToEdit( $sinceIdx, $expectedLast ) {
index b760c22..54cdbe2 100644 (file)
@@ -325,6 +325,9 @@ class TitleMethodsTest extends MediaWikiLangTestCase {
                $this->assertEquals( $expected, $title->getOtherPage()->getPrefixedText() );
        }
 
+       /**
+        * @covers Title::clearCaches
+        */
        public function testClearCaches() {
                $linkCache = LinkCache::singleton();
 
index 75e0c3e..d12e4b8 100644 (file)
@@ -552,6 +552,7 @@ class TitleTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers Title::newFromTitleValue
         * @dataProvider provideNewFromTitleValue
         */
        public function testNewFromTitleValue( TitleValue $value ) {
@@ -572,6 +573,7 @@ class TitleTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers Title::getTitleValue
         * @dataProvider provideGetTitleValue
         */
        public function testGetTitleValue( $text ) {
@@ -603,6 +605,7 @@ class TitleTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers Title::getFragment
         * @dataProvider provideGetFragment
         *
         * @param string $full
@@ -913,6 +916,7 @@ class TitleTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers Title::getFragmentForURL
         * @dataProvider provideGetFragmentForURL
         *
         * @param string $titleStr
index d57ad04..6caf3e5 100644 (file)
@@ -9,6 +9,9 @@ abstract class PoolCounterAbstractMock extends PoolCounter {
        }
 }
 
+/**
+ * @covers PoolCounter
+ */
 class PoolCounterTest extends MediaWikiTestCase {
        public function testConstruct() {
                $poolCounterConfig = [
index dd68cdc..bc7493d 100644 (file)
@@ -103,6 +103,8 @@ class UploadBaseTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers UploadBase::verifyUpload
+        *
         * test uploading a 100 bytes file with $wgMaxUploadSize = 100
         *
         * This method should be abstracted so we can test different settings.
@@ -126,6 +128,7 @@ class UploadBaseTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers UploadBase::checkSvgScriptCallback
         * @dataProvider provideCheckSvgScriptCallback
         */
        public function testCheckSvgScriptCallback( $svg, $wellFormed, $filterMatch, $message ) {
@@ -512,6 +515,7 @@ class UploadBaseTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers UploadBase::detectScriptInSvg
         * @dataProvider provideDetectScriptInSvg
         */
        public function testDetectScriptInSvg( $svg, $expected, $message ) {
@@ -552,6 +556,7 @@ class UploadBaseTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers UploadBase::checkXMLEncodingMissmatch
         * @dataProvider provideCheckXMLEncodingMissmatch
         */
        public function testCheckXMLEncodingMissmatch( $fileContents, $evil ) {