From: Timo Tijhof Date: Fri, 28 Jul 2017 04:40:21 +0000 (-0700) Subject: resourceloader: Fix @covers for CSSMin tests X-Git-Tag: 1.31.0-rc.0~2556^2 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=da6235ce3a426effc7dc4d30a6c638c9ddd1886f;p=lhc%2Fweb%2Fwiklou.git resourceloader: Fix @covers for CSSMin tests Change-Id: Idb451d244fbdfbb218a56c2953298b7fe29ed3d4 --- diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php index 4c672f4644..cd80066558 100644 --- a/includes/libs/CSSMin.php +++ b/includes/libs/CSSMin.php @@ -384,6 +384,9 @@ class CSSMin { return false; } + /** + * @codeCoverageIgnore + */ private static function getUrlRegex() { static $urlRegex; if ( $urlRegex === null ) { diff --git a/tests/phpunit/includes/libs/CSSMinTest.php b/tests/phpunit/includes/libs/CSSMinTest.php index 1a15c2607d..7d9a420c73 100644 --- a/tests/phpunit/includes/libs/CSSMinTest.php +++ b/tests/phpunit/includes/libs/CSSMinTest.php @@ -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';