Merge "mw.loader: Use Object.create() instead of $.extend() where possible"
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / CSSMinTest.php
index 1a15c26..b06df97 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';
@@ -268,9 +271,9 @@ class CSSMinTest extends MediaWikiTestCase {
                // data: URIs for red.gif, green.gif, circle.svg
                $red   = 'data:image/gif;base64,R0lGODlhAQABAIAAAP8AADAAACwAAAAAAQABAAACAkQBADs=';
                $green = 'data:image/gif;base64,R0lGODlhAQABAIAAAACAADAAACwAAAAAAQABAAACAkQBADs=';
-               $svg = 'data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A'
-                       . '%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%228%22%20height%3D'
-                       . '%228%22%3E%0A%3Ccircle%20cx%3D%224%22%20cy%3D%224%22%20r%3D%222%22%2F%3E%0A%3C%2Fsvg%3E%0A';
+               $svg = 'data:image/svg+xml,%3C%3Fxml version=%221.0%22 encoding=%22UTF-8%22%3F%3E%0A'
+                       . '%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%228%22 height='
+                       . '%228%22%3E%0A%09%3Ccircle cx=%224%22 cy=%224%22 r=%222%22/%3E%0A%3C/svg%3E%0A';
 
                // @codingStandardsIgnoreStart Generic.Files.LineLength
                return [
@@ -358,7 +361,7 @@ class CSSMinTest extends MediaWikiTestCase {
                        [
                                'SVG files are embedded without base64 encoding and unnecessary IE 6 and 7 fallback',
                                'foo { /* @embed */ background: url(circle.svg); }',
-                               "foo { background: url($svg); }",
+                               "foo { background: url(\"$svg\"); }",
                        ],
                        [
                                'Two regular files in one rule',