wiki.techinc.nl/includes/ResourceLoader/Hook/ResourceLoaderTestModulesHook.php
Timo Tijhof 68d4fe68b9 tests: Remove intermediary suites concept from /tests/qunit
I don't recall why I added this. Possibly in a confused effort
to match /tests/phpunit, except /tests/phpunit/suites is not
where test cases live, they live under /tests/phpunit/* directly,
mostly /tests/phpunit/includes named after the source directory.
The correct equivalent to that is /tests/qunit/resources for JS.

While at it, also remove mention of this concept from various other
places where it doesn't add value. It's one more word/concept to
learn, process, understand, or translate mentally. They're just tests,
or for the one or two places where we care about how they are
internally transmitted, a "test module".

Bug: T250045
Change-Id: I5ea22e4965d190357aa69883f29f9049ee8ebf13
2022-07-13 01:52:57 +00:00

40 lines
1.4 KiB
PHP

<?php
namespace MediaWiki\ResourceLoader\Hook;
use MediaWiki\ResourceLoader\ResourceLoader;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "ResourceLoaderTestModules" to register handlers implementing this interface.
*
* @deprecated since 1.33; use the QUnitTestModule static extension registration attribute instead.
* @ingroup ResourceLoaderHooks
*/
interface ResourceLoaderTestModulesHook {
/**
* Register QUnit tests to load on [[Special:JavaScriptTest]].
*
* The tests files take the form of a ResourceLoader module that will only be registered
* when $wgEnableJavaScriptTest is true, and automatically discovered and loaded when
* visiting [[Special:JavaScriptTest]].
*
* The `$testModules` array follows the same format as $wgResourceModules, and is additionally
* keyed by test framework.
*
* For example:
*
* $testModules['qunit']['test.Example'] = [
* 'localBasePath' => __DIR__ . '/tests/qunit',
* 'remoteExtPath' => 'Example/tests/qunit',
* 'script' => [ 'tests/qunit/foo.test.js' ],
* 'dependencies' => [ 'ext.Example.foo' ]
* ];
*
* @since 1.35
* @param array &$testModules
* @param ResourceLoader $rl
* @return void This hook must not abort, it must return no value
*/
public function onResourceLoaderTestModules( array &$testModules, ResourceLoader $rl ): void;
}