[MediaWiki-commits] [Gerrit] Add missing test resources - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Add missing test resources
..

Add missing test resources

Change-Id: I8b3309efce1602a1901072b869c59167638c3a1b
---
A tests/resources.php
1 file changed, 47 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseJavaScriptApi 
refs/changes/86/175986/1

diff --git a/tests/resources.php b/tests/resources.php
new file mode 100644
index 000..64eeb1d
--- /dev/null
+++ b/tests/resources.php
@@ -0,0 +1,47 @@
+?php
+
+/**
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ *
+ * @codeCoverageIgnoreStart
+ */
+return call_user_func( function() {
+
+   preg_match( '+^(.*?)' . DIRECTORY_SEPARATOR . '(vendor|extensions)' . 
DIRECTORY_SEPARATOR . '(.*)$+', __DIR__, $remoteExtPathParts );
+   $moduleTemplate = array(
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = '../' . $remoteExtPathParts[2] . 
DIRECTORY_SEPARATOR . $remoteExtPathParts[3],
+   );
+
+   $modules = array(
+   'wikibase.api.RepoApi.tests' = $moduleBase + array(
+   'scripts' = array(
+   'RepoApi.tests.js',
+   ),
+   'dependencies' = array(
+   'wikibase',
+   'wikibase.api.getLocationAgnosticMwApi',
+   'wikibase.api.RepoApi',
+   ),
+   ),
+
+   'wikibase.api.RepoApiError.tests' = $moduleBase + array(
+   'scripts' = array(
+   'RepoApiError.tests.js',
+   ),
+   'dependencies' = array(
+   'wikibase',
+   'wikibase.api.RepoApiError',
+   ),
+   'messages' = array(
+   'wikibase-error-unexpected',
+   'wikibase-error-remove-timeout',
+   'wikibase-error-ui-client-error',
+   ),
+   ),
+   );
+
+   return $modules;
+
+} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b3309efce1602a1901072b869c59167638c3a1b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Add missing test resources - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread WMDE
Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: Add missing test resources
..


Add missing test resources

Change-Id: I8b3309efce1602a1901072b869c59167638c3a1b
---
M resources.php
A tests/resources.php
2 files changed, 49 insertions(+), 1 deletion(-)

Approvals:
  Thiemo Mättig (WMDE): Verified; Looks good to me, approved



diff --git a/resources.php b/resources.php
index a3be346..143b2aa 100644
--- a/resources.php
+++ b/resources.php
@@ -9,7 +9,9 @@
  */
 return call_user_func( function() {
global $wgResourceModules;
+
$wgResourceModules = array_merge(
$wgResourceModules,
-   include 'src/resources.php'
+   include( __DIR__ . '/src/resources.php' )
);
+} );
diff --git a/tests/resources.php b/tests/resources.php
new file mode 100644
index 000..dabdcc7
--- /dev/null
+++ b/tests/resources.php
@@ -0,0 +1,46 @@
+?php
+
+/**
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ *
+ * @codeCoverageIgnoreStart
+ */
+return call_user_func( function() {
+   preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . 
'(?:vendor|extensions)'
+   . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, 
$remoteExtPath );
+
+   $moduleTemplate = array(
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = '..' . $remoteExtPath[0],
+   );
+
+   return array(
+   'wikibase.api.RepoApi.tests' = $moduleTemplate + array(
+   'scripts' = array(
+   'RepoApi.tests.js',
+   ),
+   'dependencies' = array(
+   'wikibase',
+   'wikibase.api.getLocationAgnosticMwApi',
+   'wikibase.api.RepoApi',
+   ),
+   ),
+
+   'wikibase.api.RepoApiError.tests' = $moduleTemplate + array(
+   'scripts' = array(
+   'RepoApiError.tests.js',
+   ),
+   'dependencies' = array(
+   'wikibase',
+   'wikibase.api.RepoApiError',
+   ),
+   'messages' = array(
+   'wikibase-error-unexpected',
+   'wikibase-error-remove-timeout',
+   'wikibase-error-ui-client-error',
+   ),
+   ),
+   );
+
+} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b3309efce1602a1901072b869c59167638c3a1b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de

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