mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Avoid indirect global access in unit tests
If a ResourceLoaderFileModule is constructed with no arguments, it accesses global variables, so this is not allowed from a unit test. (This is probably a bug in ResourceLoaderFileModule, but one thing at a time.) This blocks If005958c76bbfabba74def4215c48fe94f297797. Change-Id: I84056024b0d3a9dcddb1ab4dc8596118bb3fe8ea
This commit is contained in:
parent
5b4cd3623b
commit
7bd68f0efa
|
@ -14,7 +14,7 @@ use ResourceLoaderContext;
|
|||
class CiteDataModuleTest extends \MediaWikiUnitTestCase {
|
||||
|
||||
public function testGetScript() {
|
||||
$module = new CiteVisualEditorModule();
|
||||
$module = new CiteVisualEditorModule( [], '', '' );
|
||||
$context = $this->createResourceLoaderContext();
|
||||
|
||||
$this->assertSame(
|
||||
|
@ -24,7 +24,7 @@ class CiteDataModuleTest extends \MediaWikiUnitTestCase {
|
|||
}
|
||||
|
||||
public function testGetDefinitionSummary() {
|
||||
$module = new CiteVisualEditorModule();
|
||||
$module = new CiteVisualEditorModule( [], '', '' );
|
||||
$context = $this->createResourceLoaderContext();
|
||||
$summary = $module->getDefinitionSummary( $context );
|
||||
|
||||
|
|
Loading…
Reference in a new issue