Merge "Add @covers tags for more tests"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 2 Jan 2018 12:19:02 +0000 (12:19 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 2 Jan 2018 12:19:02 +0000 (12:19 +0000)
tests/phpunit/includes/FauxRequestTest.php
tests/phpunit/includes/htmlform/HTMLRestrictionsFieldTest.php
tests/phpunit/includes/libs/DeferredStringifierTest.php
tests/phpunit/includes/libs/DnsSrvDiscovererTest.php
tests/phpunit/includes/libs/IPTest.php
tests/phpunit/includes/libs/ProcessCacheLRUTest.php
tests/phpunit/includes/libs/SamplingStatsdClientTest.php
tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php
tests/phpunit/includes/libs/rdbms/TransactionProfilerTest.php
tests/phpunit/includes/utils/AvroValidatorTest.php
tests/phpunit/includes/utils/MWCryptHashTest.php

index e39dcdb..f6ccbc7 100644 (file)
@@ -42,13 +42,19 @@ class FauxRequestTest extends PHPUnit_Framework_TestCase {
                $this->assertEquals( '', $req->getText( 'z' ) );
        }
 
-       // Integration test for parent method.
+       /**
+        * Integration test for parent method
+        * @covers FauxRequest::getVal
+        */
        public function testGetVal() {
                $req = new FauxRequest( [ 'crlf' => "A\r\nb" ] );
                $this->assertSame( "A\r\nb", $req->getVal( 'crlf' ), 'CRLF' );
        }
 
-       // Integration test for parent method.
+       /**
+        * Integration test for parent method
+        * @covers FauxRequest::getRawVal
+        */
        public function testGetRawVal() {
                $req = new FauxRequest( [
                        'x' => 'Value',
index 13c92e3..75c93be 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @covers HTMLRestrictionsField
+ */
 class HTMLRestrictionsFieldTest extends PHPUnit_Framework_TestCase {
 
        use MediaWikiCoversValidator;
index c3a1285..19dc53c 100644 (file)
@@ -1,11 +1,13 @@
 <?php
 
+/**
+ * @covers DeferredStringifier
+ */
 class DeferredStringifierTest extends PHPUnit_Framework_TestCase {
 
        use MediaWikiCoversValidator;
 
        /**
-        * @covers DeferredStringifier
         * @dataProvider provideToString
         */
        public function testToString( $params, $expected ) {
index bc20c4c..264cc00 100644 (file)
@@ -1,11 +1,13 @@
 <?php
 
+/**
+ * @covers DnsSrvDiscoverer
+ */
 class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase {
 
        use MediaWikiCoversValidator;
 
        /**
-        * @covers DnsSrvDiscoverer
         * @dataProvider provideRecords
         */
        public function testPickServer( $params, $expected ) {
index 84e4706..8a120ea 100644 (file)
@@ -564,7 +564,7 @@ class IPTest extends PHPUnit_Framework_TestCase {
        }
 
        /**
-        * Test for IP::splitHostAndPort().
+        * @covers IP::splitHostAndPort()
         * @dataProvider provideSplitHostAndPort
         */
        public function testSplitHostAndPort( $expected, $input, $description ) {
@@ -591,7 +591,7 @@ class IPTest extends PHPUnit_Framework_TestCase {
        }
 
        /**
-        * Test for IP::combineHostAndPort()
+        * @covers IP::combineHostAndPort()
         * @dataProvider provideCombineHostAndPort
         */
        public function testCombineHostAndPort( $expected, $input, $description ) {
@@ -615,7 +615,7 @@ class IPTest extends PHPUnit_Framework_TestCase {
        }
 
        /**
-        * Test for IP::sanitizeRange()
+        * @covers IP::sanitizeRange()
         * @dataProvider provideIPCIDRs
         */
        public function testSanitizeRange( $input, $expected, $description ) {
@@ -639,7 +639,7 @@ class IPTest extends PHPUnit_Framework_TestCase {
        }
 
        /**
-        * Test for IP::prettifyIP()
+        * @covers IP::prettifyIP()
         * @dataProvider provideIPsToPrettify
         */
        public function testPrettifyIP( $ip, $prettified ) {
index e027d5b..ddb7bfa 100644 (file)
@@ -60,6 +60,7 @@ class ProcessCacheLRUTest extends PHPUnit_Framework_TestCase {
 
        /**
         * Highlight diff between assertEquals and assertNotSame
+        * @coversNothing
         */
        public function testPhpUnitArrayEquality() {
                $one = [ 'A' => 1, 'B' => 2 ];
index cf18aaf..d0e404b 100644 (file)
@@ -3,6 +3,9 @@
 use Liuggio\StatsdClient\Entity\StatsdData;
 use Liuggio\StatsdClient\Sender\SenderInterface;
 
+/**
+ * @covers SamplingStatsdClient
+ */
 class SamplingStatsdClientTest extends PHPUnit_Framework_TestCase {
 
        use MediaWikiCoversValidator;
index a0de408..54706d5 100644 (file)
@@ -3,6 +3,9 @@
 use Wikimedia\Rdbms\TransactionProfiler;
 use Psr\Log\LoggerInterface;
 
+/**
+ * @covers \Wikimedia\Rdbms\TransactionProfiler
+ */
 class TransactionProfilerTest extends PHPUnit_Framework_TestCase {
 
        use MediaWikiCoversValidator;
index 902f6d9..caeeaab 100644 (file)
@@ -9,6 +9,9 @@
  * dataprovider.
  */
 
+/**
+ * @covers AvroValidator
+ */
 class AvroValidatorTest extends PHPUnit_Framework_TestCase {
 
        use MediaWikiCoversValidator;
index f6503ef..66c8d00 100644 (file)
@@ -1,9 +1,10 @@
 <?php
+
 /**
- *
  * @group Hash
+ *
+ * @covers MWCryptHash
  */
-
 class MWCryptHashTest extends PHPUnit_Framework_TestCase {
 
        use MediaWikiCoversValidator;