From b54a1e709e5270c5d7f2ef020306db41868becfb Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 15 Apr 2019 20:21:00 +0100 Subject: [PATCH] resourceloader: Use 'fallback' as default for ResourceLoaderTestCase 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 | 2 +- .../resourceloader/ResourceLoaderOOUIImageModuleTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/ResourceLoaderTestCase.php b/tests/phpunit/ResourceLoaderTestCase.php index c7fb48b6f3..57f56f4400 100644 --- a/tests/phpunit/ResourceLoaderTestCase.php +++ b/tests/phpunit/ResourceLoaderTestCase.php @@ -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, diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderOOUIImageModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderOOUIImageModuleTest.php index ea220f1148..30e9f300c1 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderOOUIImageModuleTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderOOUIImageModuleTest.php @@ -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)' ); } -- 2.20.1