resourceloader: Use 'fallback' as default for ResourceLoaderTestCase
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 15 Apr 2019 19:21:00 +0000 (20:21 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 15 Apr 2019 19:21:00 +0000 (20:21 +0100)
Follows-up fa05976f5f. This broke the Travis CI tests because
the Vector skin is not installed there (unlike in Wikimedia CI).

Make the test no longer reliant on that detail.

* Fix ResourceLoaderTestCase to use a default that actually
  works in plain core (previously 'vector' would be rejected
  as being an unknown skin, but then be re-normalised back to
  'vector' thanks to wgDefaultSkin. This was fixed in fa05976f5f,
  and the unknown skin now produces 'fallback' which is better.

* Update ResourceLoaderOOUIImageModuleTest to match this
  new default and also fix the test message while at it
  to mention 'skin', not 'image'.

Change-Id: I5fb69a6a38a42b1a5f325c0134e01ad880f65087

tests/phpunit/ResourceLoaderTestCase.php
tests/phpunit/includes/resourceloader/ResourceLoaderOOUIImageModuleTest.php

index c7fb48b..57f56f4 100644 (file)
@@ -29,7 +29,7 @@ abstract class ResourceLoaderTestCase extends MediaWikiTestCase {
                        'debug' => 'true',
                        'lang' => 'en',
                        'dir' => 'ltr',
-                       'skin' => 'vector',
+                       'skin' => 'fallback',
                        'modules' => 'startup',
                        'only' => 'scripts',
                        'safemode' => null,
index ea220f1..30e9f30 100644 (file)
@@ -56,9 +56,9 @@ class ResourceLoaderOOUIImageModuleTest extends ResourceLoaderTestCase {
                        'Generated styles use the default image (embed)'
                );
                $this->assertRegExp(
-                       '/vector/',
+                       '/fallback/',
                        $styles['all'],
-                       'Generated styles use the default image (link)'
+                       'Generated styles use the default skin (link)'
                );
        }