jenkins-bot has submitted this change and it was merged.

Change subject: Move all test modules to Resources.php
......................................................................


Move all test modules to Resources.php

Change-Id: Ia43038ad17ac3f8bc3ddafb71e7e3bd9698c343b
---
M ContentTranslation.hooks.php
M ContentTranslation.php
M Resources.php
3 files changed, 10 insertions(+), 20 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index ea21786..953ed97 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -90,22 +90,4 @@
                $vars['wgContentTranslationExperimentalFeatures'] = 
$wgContentTranslationExperimentalFeatures;
                return true;
        }
-
-       /**
-        * @param $testModules array of javascript testing modules. 'qunit' is 
fed
-        * using tests/qunit/QUnitTestResources.php.
-        * @param ResourceLoader $resourceLoader
-        * @return bool
-        * Hook: ResourceLoaderTestModules
-        */
-       public static function addTestModules( array &$testModules, 
ResourceLoader &$resourceLoader ) {
-               $testModules['qunit']['ext.cx.tools.tests'] = array(
-                       'scripts' => array( 
'tests/qunit/ext.cx.tools.template.test.js' ),
-                       'dependencies' => array( 'ext.cx.model', 
'ext.cx.tools.template' ),
-                       'localBasePath' => __DIR__,
-                       'remoteExtPath' => 'ContentTranslation',
-               );
-
-               return true;
-       }
 }
diff --git a/ContentTranslation.php b/ContentTranslation.php
index 98dcdf9..007067c 100644
--- a/ContentTranslation.php
+++ b/ContentTranslation.php
@@ -67,8 +67,6 @@
 $GLOBALS['wgHooks']['BeforePageDisplay'][] = 
'ContentTranslationHooks::addModules';
 $GLOBALS['wgHooks']['GetBetaFeaturePreferences'][] = 
'ContentTranslationHooks::getPreferences';
 $GLOBALS['wgHooks']['ResourceLoaderGetConfigVars'][] = 
'ContentTranslationHooks::addConfig';
-$GLOBALS['wgHooks']['ResourceLoaderTestModules'][] =
-       'ContentTranslationHooks::addTestModules';
 
 $GLOBALS['wgExtensionFunctions'][] = function () {
        global $wgResourceModules, $wgContentTranslationEventLogging;
diff --git a/Resources.php b/Resources.php
index 87b4189..bbc1902 100644
--- a/Resources.php
+++ b/Resources.php
@@ -448,4 +448,14 @@
                        'mediawiki.Uri',
                ),
        ) + $resourcePaths;
+
+       $modules['qunit']['ext.cx.tools.tests'] = array(
+               'scripts' => array(
+                       'tests/qunit/ext.cx.tools.template.test.js'
+               ),
+               'dependencies' => array(
+                       'ext.cx.model',
+                       'ext.cx.tools.template',
+               ),
+       ) + $resourcePaths;
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia43038ad17ac3f8bc3ddafb71e7e3bd9698c343b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>
Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to