Replace use of deprecated ResourceLoaderTestModules hook

Use the new extension.json attribute instead.

Bug: T214211
Change-Id: I79c45c6923fd19f6f9f068492b3bd6548161dd04
Depends-On: I27ecebe27d7aaebe6d1317bc5eaea9cca368b45d
This commit is contained in:
James D. Forrester 2019-02-13 14:53:05 -08:00
parent 81dd16da9c
commit ebe89e3c7d
2 changed files with 6 additions and 21 deletions

View file

@ -30,9 +30,6 @@
"ResourceLoaderGetConfigVars": [
"WikiEditorHooks::resourceLoaderGetConfigVars"
],
"ResourceLoaderTestModules": [
"WikiEditorHooks::resourceLoaderTestModules"
],
"MakeGlobalVariablesScript": [
"WikiEditorHooks::makeGlobalVariablesScript"
],
@ -298,6 +295,12 @@
"localBasePath": "modules",
"remoteExtPath": "WikiEditor/modules"
},
"QUnitTestModule": {
"localBasePath": "",
"remoteExtPath": "WikiEditor",
"scripts": "tests/qunit/ext.wikiEditor.toolbar.test.js",
"dependencies": [ "ext.wikiEditor" ]
},
"DefaultUserOptions": {
"usebetatoolbar": true
},

View file

@ -194,24 +194,6 @@ class WikiEditorHooks {
$vars['mw.msg.wikieditor'] = wfMessage( 'sig-text', '~~~~' )->inContentLanguage()->text();
}
/**
* ResourceLoaderTestModules hook
*
* Registers JavaScript test modules
*
* @param array &$testModules array of javascript testing modules. 'qunit' is fed using
* tests/qunit/QUnitTestResources.php.
* @param ResourceLoader &$resourceLoader
*/
public static function resourceLoaderTestModules( &$testModules, &$resourceLoader ) {
$testModules['qunit']['ext.wikiEditor.toolbar.test'] = [
'scripts' => [ 'tests/qunit/ext.wikiEditor.toolbar.test.js' ],
'dependencies' => [ 'ext.wikiEditor' ],
'localBasePath' => __DIR__ . '/..',
'remoteExtPath' => 'WikiEditor',
];
}
/**
* MakeGlobalVariablesScript hook
*