jenkins-bot has submitted this change and it was merged.
Change subject: Let MediaWiki auto-discover tests
......................................................................
Let MediaWiki auto-discover tests
Supported in MediaWiki since 1.24
Change-Id: I2d9ab5de379e40b920f61d0b20fcb491e45b79dc
---
M includes/Hooks.php
1 file changed, 3 insertions(+), 14 deletions(-)
Approvals:
Thiemo Mättig (WMDE): Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 3534048..90a8bd9 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -18,25 +18,14 @@
* Hook to add PHPUnit test cases.
* @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
*
- * @param array $files
+ * @param string[] &$paths
*
* @return bool
*/
- public static function registerUnitTests( array &$files ) {
- // @codeCoverageIgnoreStart
- $directoryIterator = new RecursiveDirectoryIterator( __DIR__ .
'/../tests/phpunit/' );
-
- /**
- * @var SplFileInfo $fileInfo
- */
- foreach ( new RecursiveIteratorIterator( $directoryIterator )
as $fileInfo ) {
- if ( substr( $fileInfo->getFilename(), -8 ) ===
'Test.php' ) {
- $files[] = $fileInfo->getPathname();
- }
- }
+ public static function registerUnitTests( array &$paths ) {
+ $paths[] = __DIR__ . '/../tests/phpunit/';
return true;
- // @codeCoverageIgnoreEnd
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/188229
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2d9ab5de379e40b920f61d0b20fcb491e45b79dc
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Capiunto
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits