MediaWiki REL1_35
MediaWiki\ResourceLoader\Hook\ResourceLoaderTestModulesHook Interface Reference
Inheritance diagram for MediaWiki\ResourceLoader\Hook\ResourceLoaderTestModulesHook:

Public Member Functions

 onResourceLoaderTestModules (array &$testModules, ResourceLoader $rl)
 Use this hook to register ResourceLoader modules that are only available when $wgEnableJavaScriptTest is true.
 

Detailed Description

Deprecated:
since 1.33; use the QUnitTestModule static extension registration attribute instead.

Definition at line 11 of file ResourceLoaderTestModulesHook.php.

Member Function Documentation

◆ onResourceLoaderTestModules()

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.

Since
1.35
Parameters
array&$testModulesOne 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
Returns
void This hook must not abort, it must return no value

Implemented in MediaWiki\ResourceLoader\HookRunner.


The documentation for this interface was generated from the following file: