Hoo man has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/188229

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, 1 insertion(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Capiunto 
refs/changes/29/188229/1

diff --git a/includes/Hooks.php b/includes/Hooks.php
index 3534048..ff44121 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -24,16 +24,7 @@
         */
        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();
-                       }
-               }
+               $files[] = __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: newchange
Gerrit-Change-Id: I2d9ab5de379e40b920f61d0b20fcb491e45b79dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Capiunto
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to