mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-23 15:57:15 +00:00
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:
parent
81dd16da9c
commit
ebe89e3c7d
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue