Manual:Hooks/UnitTestsList

UnitTestsList allows registration of additional test suites to execute under PHPUnit. Extensions can append paths to files to the  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".

Registering your tests
Let's assume our extension is named Fruits.


 * 1) Create a hook function for onUnitTestsList.
 * 2) Register the hook with UnitTestsList.