From: C. Scott Ananian Date: Tue, 25 Sep 2018 14:31:57 +0000 (-0400) Subject: OutputPageTest should be independent of $wgResourceLoaderDebug setting X-Git-Tag: 1.34.0-rc.0~3990^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=36f14abd2656cca030d3cbe4ddbbf8639c48cf7c;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 *