Available from version 1.17.0 (r68673)
Allows extensions to extend core's PHPUnit test suite
Define function:
public static function onUnitTestsList( array &$paths ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"UnitTestsList": "MyExtensionHooks::onUnitTestsList"

For MediaWiki ≤1.25:

$wgHooks['UnitTestsList'][] = 'MyExtensionHooks::onUnitTestsList';
Called from:File(s): ../tests/phpunit/suites/ExtensionsTestSuite.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:UnitTestsList extensions.

UnitTestsList allows registration of additional test suites to execute under PHPUnit. Extensions can append paths to files to the $paths array, and since MediaWiki 1.24, can specify paths to directories, which will be scanned recursively for any test case files with the suffix "Test.php".

Since MediaWiki 1.28 test case files with the suffix "Test.php" in the extension subdirectory "tests/phpunit" are automatically appended; this renders this hook less useful in the general case, but still useful for specific file structures.

See alsoEdit