Manual:Hooks/UnitTestsList

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.