https://bugzilla.wikimedia.org/show_bug.cgi?id=70630
Bug ID: 70630
Summary: Reduce duplication for UnitTestList hook in extensions
Product: MediaWiki
Version: 1.24-git
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Unit tests
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Web browser: ---
Mobile Platform: ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l