wiki.techinc.nl/includes/resourceloader/Hook/ResourceLoaderTestModulesHook.php
apaskulin c44488f725 docs: Hook interface doc comment review
Edited doc comments for hook interfaces to improve
consistency and add type hints.

Bug: T246855
Change-Id: I38fa802463cd6f39bf5946dbbeb1b3ebaea604b2
2020-04-21 09:10:08 +10:00

32 lines
987 B
PHP

<?php
namespace MediaWiki\Hook;
use ResourceLoader;
/**
* @deprecated since 1.33
* @ingroup Hooks
*/
interface ResourceLoaderTestModulesHook {
/**
* 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
*
* @param 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' ]
* ];
* @param ResourceLoader $ResourceLoader
* @return bool|void True or no return value to continue or false to abort
*/
public function onResourceLoaderTestModules( &$testModules, $ResourceLoader );
}