Most extensions use the same implementation of the UnitTestList hook (eg: https://github.com/wikimedia/mediawiki-extensions-Thanks/blob/master/Thanks.hooks.php#L245).
Some just use a plain glob() which is nice until someone adds a subdirectory in tests/ and tests look like they're passing but they're actually not even being run.
My idea is that we just turn that into a closure passed with the hook, so the subscriber simply becomes:
public static function registerUnitTests( array &$files, Closure $recursiveFinder ) {
$files += $recursiveFinder( DIR . '/tests' );
return true;
}
Or something.
Version: 1.24rc
Severity: normal