X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FCSSMinTest.php;h=667eb0ace6185c0afdecb78e6a3626f4da478d0d;hb=4b2f95bed5a9ae0a917264abed2ba1fd9fb78f3c;hp=b06df976662f7a265258fbb47fefc43aab752094;hpb=31495b9e60e01438f5906cb24d484599e4930e66;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/libs/CSSMinTest.php b/tests/phpunit/includes/libs/CSSMinTest.php index b06df97666..667eb0ace6 100644 --- a/tests/phpunit/includes/libs/CSSMinTest.php +++ b/tests/phpunit/includes/libs/CSSMinTest.php @@ -149,6 +149,12 @@ class CSSMinTest extends MediaWikiTestCase { [ "foo { content: '\"'; }", "foo{content:'\"'}" ], // - Whitespace in string values [ 'foo { content: " "; }', 'foo{content:" "}' ], + + // Whitespaces after opening and before closing parentheses and brackets + [ 'a:not( [ href ] ) { prop: url( foobar.png ); }', 'a:not([href]){prop:url(foobar.png)}' ], + + // Ensure that the invalid "url (" will not become the valid "url(" by minification + [ 'foo { prop: url ( foobar.png ); }', 'foo{prop:url (foobar.png)}' ], ]; } @@ -271,11 +277,12 @@ 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 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'; + $svg = 'data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%228' + . '%22 height=%228%22 viewBox=%220 0 8 8%22%3E %3Ccircle cx=%224%22 cy=%224%22 ' + . 'r=%222%22/%3E %3Ca xmlns:xlink=%22http://www.w3.org/1999/xlink%22 xlink:title=' + . '%22%3F%3E%22%3Etest%3C/a%3E %3C/svg%3E'; - // @codingStandardsIgnoreStart Generic.Files.LineLength + // phpcs:disable Generic.Files.LineLength return [ [ 'Regular file', @@ -492,7 +499,7 @@ class CSSMinTest extends MediaWikiTestCase { '.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(http://localhost/w/images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }', ], ]; - // @codingStandardsIgnoreEnd + // phpcs:enable } /**