MediaWiki REL1_37
|
This is a hook handler interface, see docs/Hooks.md. More...
Public Member Functions | |
onResourceLoaderTestModules (array &$testModules, ResourceLoader $rl) | |
Use this hook to register ResourceLoader modules that are only available when $wgEnableJavaScriptTest is true. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "ResourceLoaderTestModules" to register handlers implementing this interface.
Definition at line 14 of file ResourceLoaderTestModulesHook.php.
MediaWiki\ResourceLoader\Hook\ResourceLoaderTestModulesHook::onResourceLoaderTestModules | ( | array & | $testModules, |
ResourceLoader | $rl | ||
) |
Use this hook to register ResourceLoader modules that are only available when $wgEnableJavaScriptTest is true.
Use this for test suites and other test-only resources.
array | &$testModules | One array of modules per test framework. The modules array follows the same format as $wgResourceModules . For example: $testModules['qunit']['ext.Example.test'] = [ 'localBasePath' => DIR . '/tests/qunit', 'remoteExtPath' => 'Example/tests/qunit', 'script' => [ 'tests/qunit/foo.js' ], 'dependencies' => [ 'ext.Example.foo' ] ]; |
ResourceLoader | $rl |
Implemented in MediaWiki\ResourceLoader\HookRunner.