Merge "Run database-using tests in MySQL STRICT mode"
[lhc/web/wiklou.git] / tests / phpunit / includes / HtmlTest.php
index 4721793..85c95e4 100644 (file)
@@ -271,7 +271,7 @@ class HtmlTest extends MediaWikiTestCase {
        /**
         * How do we handle duplicate keys in HTML attributes expansion?
         * We could pass a "class" the values: 'GREEN' and array( 'GREEN' => false )
-        * The later will take precedence.
+        * The latter will take precedence.
         *
         * Feature added by r96188
         * @covers Html::expandAttributes
@@ -738,6 +738,16 @@ class HtmlTest extends MediaWikiTestCase {
                                '1x.png 1x, 1_5x.png 1.5x, 2x.png 2x',
                                'pixel depth keys may omit a trailing "x"'
                        ],
+                       [
+                               [ '1'  => 'small.png', '1.5' => 'large.png', '2'  => 'large.png' ],
+                               'small.png 1x, large.png 1.5x',
+                               'omit larger duplicates'
+                       ],
+                       [
+                               [ '1'  => 'small.png', '2'  => 'large.png', '1.5' => 'large.png' ],
+                               'small.png 1x, large.png 1.5x',
+                               'omit larger duplicates in irregular order'
+                       ],
                ];
        }