Last modified: 2014-10-23 19:54:00 UTC
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.
Yes! Here's a patch that should help: https://gerrit.wikimedia.org/r/163528
Change 163528 had a related patch set uploaded by Hashar: Extensions may add tests by directory https://gerrit.wikimedia.org/r/163528
Change 163528 merged by jenkins-bot: Extensions may add tests by directory https://gerrit.wikimedia.org/r/163528
Change 168207 had a related patch set uploaded by Awight: Extensions may add tests by directory https://gerrit.wikimedia.org/r/168207
Change 168207 merged by jenkins-bot: Extensions may add tests by directory https://gerrit.wikimedia.org/r/168207
Was backported, so setting milestone 1.24