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)
1  2 
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

@@@ -1,9 -1,9 +1,12 @@@
  <?php
  
+ /**
+  * @covers HTMLRestrictionsField
+  */
  class HTMLRestrictionsFieldTest extends PHPUnit_Framework_TestCase {
 +
 +      use MediaWikiCoversValidator;
 +
        public function testConstruct() {
                $field = new HTMLRestrictionsField( [ 'fieldname' => 'restrictions' ] );
                $this->assertNotEmpty( $field->getLabel(), 'has a default label' );
@@@ -1,11 -1,11 +1,13 @@@
  <?php
  
+ /**
+  * @covers DeferredStringifier
+  */
  class DeferredStringifierTest extends PHPUnit_Framework_TestCase {
  
 +      use MediaWikiCoversValidator;
 +
        /**
-        * @covers DeferredStringifier
         * @dataProvider provideToString
         */
        public function testToString( $params, $expected ) {
@@@ -1,11 -1,10 +1,13 @@@
  <?php
  
+ /**
+  * @covers DnsSrvDiscoverer
+  */
  class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase {
 +
 +      use MediaWikiCoversValidator;
 +
        /**
-        * @covers DnsSrvDiscoverer
         * @dataProvider provideRecords
         */
        public function testPickServer( $params, $expected ) {
@@@ -3,10 -3,10 +3,13 @@@
  use Liuggio\StatsdClient\Entity\StatsdData;
  use Liuggio\StatsdClient\Sender\SenderInterface;
  
+ /**
+  * @covers SamplingStatsdClient
+  */
  class SamplingStatsdClientTest extends PHPUnit_Framework_TestCase {
 +
 +      use MediaWikiCoversValidator;
 +
        /**
         * @dataProvider samplingDataProvider
         */
@@@ -3,10 -3,10 +3,13 @@@
  use Wikimedia\Rdbms\TransactionProfiler;
  use Psr\Log\LoggerInterface;
  
+ /**
+  * @covers \Wikimedia\Rdbms\TransactionProfiler
+  */
  class TransactionProfilerTest extends PHPUnit_Framework_TestCase {
 +
 +      use MediaWikiCoversValidator;
 +
        public function testAffected() {
                $logger = $this->getMockBuilder( LoggerInterface::class )->getMock();
                $logger->expects( $this->exactly( 3 ) )->method( 'info' );
@@@ -9,10 -9,10 +9,13 @@@
   * dataprovider.
   */
  
+ /**
+  * @covers AvroValidator
+  */
  class AvroValidatorTest extends PHPUnit_Framework_TestCase {
 +
 +      use MediaWikiCoversValidator;
 +
        public function setUp() {
                if ( !class_exists( 'AvroSchema' ) ) {
                        $this->markTestSkipped( 'Avro is required to run the AvroValidatorTest' );
@@@ -1,13 -1,12 +1,14 @@@
  <?php
  /**
-  *
   * @group Hash
+  *
+  * @covers MWCryptHash
   */
  class MWCryptHashTest extends PHPUnit_Framework_TestCase {
  
 +      use MediaWikiCoversValidator;
 +
        public function testHashLength() {
                if ( MWCryptHash::hashAlgo() !== 'whirlpool' ) {
                        $this->markTestSkipped( 'Hash algorithm isn\'t whirlpool' );