Merge "CSSMin: Correctly avoid fallbacks when embedding SVG files"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 2 Nov 2016 18:33:17 +0000 (18:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 2 Nov 2016 18:33:17 +0000 (18:33 +0000)
includes/libs/CSSMin.php
tests/phpunit/includes/libs/CSSMinTest.php

index 6e40f4c..797a438 100644 (file)
@@ -319,7 +319,7 @@ class CSSMin {
                                                        );
 
                                                        $url = $match['file'] . $match['query'];
-                                                       $file = $local . $match['file'];
+                                                       $file = "{$local}/{$match['file']}";
                                                        if (
                                                                !self::isRemoteUrl( $url ) && !self::isLocalUrl( $url )
                                                                && file_exists( $file )
index 5f5a1e8..366714b 100644 (file)
@@ -129,8 +129,8 @@ class CSSMinTest extends MediaWikiTestCase {
         * @covers CSSMin::remap
         */
        public function testRemapRemapping( $message, $input, $expectedOutput ) {
-               $localPath = __DIR__ . '/../../data/cssmin/';
-               $remotePath = 'http://localhost/w/';
+               $localPath = __DIR__ . '/../../data/cssmin';
+               $remotePath = 'http://localhost/w';
 
                $realOutput = CSSMin::remap( $input, $localPath, $remotePath );
                $this->assertEquals( $expectedOutput, $realOutput, "CSSMin::remap: $message" );