Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/158380
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/80/158380/1 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..20365c4 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: newchange Gerrit-Change-Id: Ia43038ad17ac3f8bc3ddafb71e7e3bd9698c343b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits