Phuedx has uploaded a new change for review.

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

Change subject: Register the PHPUnit test directory
......................................................................

Register the PHPUnit test directory

... as opposed to enumerating all of the PHPUnit tests.

From Hook:UnitTestsList: "... since MediaWiki 1.24, can specify paths to
directories, which will be scanned recursively for any test case files
with the suffix "Test.php"."

Change-Id: Ib28d92fc0228c9a70252c3855692ee9ffd9ba60c
---
M includes/MobileFrontend.hooks.php
1 file changed, 1 insertion(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/33/187833/1

diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 49f226c..fe22309 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -758,28 +758,8 @@
         * @return bool
         */
        public static function onUnitTestsList( &$files ) {
-               $dir = dirname( dirname( __FILE__ ) ) . '/tests/phpunit';
+               $files[] = dirname( dirname( __FILE__ ) ) . '/tests/phpunit';
 
-               $callback = function( $file ) use ( $dir ) {
-                       return "$dir/$file";
-               };
-               $files = array_merge( $files,
-                       array_map( $callback,
-                               array(
-                                       'api/ApiMobileViewTest.php',
-                                       'api/ApiParseExtenderTest.php',
-                                       'DeviceDetectionTest.php',
-                                       'MobileContextTest.php',
-                                       'MobileFormatterTest.php',
-                                       
'modules/MFResourceLoaderParsedMessageModuleTest.php',
-                                       'skins/SkinMinervaTest.php',
-                                       'skins/SkinMinervaAlphaTest.php',
-                                       'skins/SkinMinervaBetaTest.php',
-                                       'specials/MobileSpecialPageTest.php',
-                                       'specials/SpecialMobileDiffTest.php',
-                               )
-                       )
-               );
                return true;
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/187833
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib28d92fc0228c9a70252c3855692ee9ffd9ba60c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx <g...@samsmith.io>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to