resourceloader: Fix @covers for CSSMin tests
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 28 Jul 2017 04:40:21 +0000 (21:40 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 28 Jul 2017 04:40:21 +0000 (21:40 -0700)
Change-Id: Idb451d244fbdfbb218a56c2953298b7fe29ed3d4

includes/libs/CSSMin.php
tests/phpunit/includes/libs/CSSMinTest.php

index 4c672f4..cd80066 100644 (file)
@@ -384,6 +384,9 @@ class CSSMin {
                return false;
        }
 
+       /**
+        * @codeCoverageIgnore
+        */
        private static function getUrlRegex() {
                static $urlRegex;
                if ( $urlRegex === null ) {
index 1a15c26..7d9a420 100644 (file)
@@ -24,6 +24,7 @@ class CSSMinTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider mimeTypeProvider
+        * @covers CSSMin::getMimeType
         */
        public function testGetMimeType( $fileContents, $fileExtension, $expected ) {
                $fileName = wfTempDir() . DIRECTORY_SEPARATOR . uniqid( 'MW_PHPUnit_CSSMinTest_' ) . '.'
@@ -167,7 +168,7 @@ class CSSMinTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideIsRemoteUrl
-        * @cover CSSMin::isRemoteUrl
+        * @covers CSSMin::isRemoteUrl
         */
        public function testIsRemoteUrl( $expect, $url ) {
                $this->assertEquals( CSSMinTestable::isRemoteUrl( $url ), $expect );
@@ -184,18 +185,19 @@ class CSSMinTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideIsLocalUrls
-        * @cover CSSMin::isLocalUrl
+        * @covers CSSMin::isLocalUrl
         */
        public function testIsLocalUrl( $expect, $url ) {
                $this->assertEquals( CSSMinTestable::isLocalUrl( $url ), $expect );
        }
 
        /**
-        * This tests funky parameters to CSSMin::remap. testRemapRemapping tests
-        * the basic functionality.
+        * This test tests funky parameters to CSSMin::remap.
         *
+        * @see testRemapRemapping for testing of the basic functionality
         * @dataProvider provideRemapCases
         * @covers CSSMin::remap
+        * @covers CSSMin::remapOne
         */
        public function testRemap( $message, $params, $expectedOutput ) {
                $remapped = call_user_func_array( 'CSSMin::remap', $params );
@@ -246,10 +248,11 @@ class CSSMinTest extends MediaWikiTestCase {
        }
 
        /**
-        * This tests basic functionality of CSSMin::remap. testRemapRemapping tests funky parameters.
+        * This tests the basic functionality of CSSMin::remap.
         *
+        * @see testRemap for testing of funky parameters
         * @dataProvider provideRemapRemappingCases
-        * @covers CSSMin::remap
+        * @covers CSSMin
         */
        public function testRemapRemapping( $message, $input, $expectedOutput ) {
                $localPath = __DIR__ . '/../../data/cssmin';