Page MenuHomePhabricator

Fix warnings in GlobalCssJs test cases
Closed, ResolvedPublic

Description

8.4586  65.4M  ResourceLoader::__construct was called without providing a Config instance
[GlobalCssJs] $wgGlobalCssJsConfig has not been configured properly.

In every mediawiki-extensions-hhvm build.

Caused by ResourceLoaderGlobalModuleTestCase::getContext which instantiates ResourceLoader with no config, which then registers core modules and extensions, and then results in its own onResourceLoaderRegisterModules handler throwing a warning for wgGlobalCssJsConfig being invalid.

Event Timeline

Krinkle raised the priority of this task from to Medium.
Krinkle updated the task description. (Show Details)
Krinkle added a project: GlobalCssJs.
Krinkle subscribed.
Krinkle set Security to None.
Krinkle added a subscriber: Legoktm.

Change 205642 had a related patch set uploaded (by Legoktm):
tests: Pass Config to ResourceLoader constructor

https://gerrit.wikimedia.org/r/205642

The [GlobalCssJs] $wgGlobalCssJsConfig has not been configured properly. line is intentional as there's a test case that is testing that functionality:

			array(
				array( 'wgGlobalCssJsConfig' => array( 'wiki' => false ) ),
				array(),
				'TestUser',
				"If \$wgGlobalCssJsConfig['wiki'] = false, no pages are loaded",
			),

Change 205642 merged by jenkins-bot:
tests: Pass Config to ResourceLoader constructor

https://gerrit.wikimedia.org/r/205642