From 36f14abd2656cca030d3cbe4ddbbf8639c48cf7c Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Tue, 25 Sep 2018 10:31:57 -0400 Subject: [PATCH] OutputPageTest should be independent of $wgResourceLoaderDebug setting `OutputPageTest::testMakeResourceLoaderLink()` and `OutputPageTest::testBuildExemptModules()` tried to force `$wgResourceLoaderDebug=false` before running the test, but they neglected to clear the resource loader debug cache (`ResourceLoader::clearCache()`) so the user's local setting of `$wgResourceLoaderDebug` would be used despite it all. Change-Id: I3e7dec762c8a02683fc66a630c950b72a4840a9b --- tests/phpunit/includes/OutputPageTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/phpunit/includes/OutputPageTest.php b/tests/phpunit/includes/OutputPageTest.php index d334b73925..d48da70f45 100644 --- a/tests/phpunit/includes/OutputPageTest.php +++ b/tests/phpunit/includes/OutputPageTest.php @@ -12,6 +12,16 @@ class OutputPageTest extends MediaWikiTestCase { const SCREEN_MEDIA_QUERY = 'screen and (min-width: 982px)'; const SCREEN_ONLY_MEDIA_QUERY = 'only screen and (min-width: 982px)'; + // Ensure that we don't affect the global ResourceLoader state. + protected function setUp() { + parent::setUp(); + ResourceLoader::clearCache(); + } + protected function tearDown() { + parent::tearDown(); + ResourceLoader::clearCache(); + } + /** * @dataProvider provideRedirect * -- 2.20.1