Aude has uploaded a new change for review.
https://gerrit.wikimedia.org/r/133904
Change subject: Add type hint in ApiClientInfo + fix test
......................................................................
Add type hint in ApiClientInfo + fix test
For compatibility with Ie6bf191 in core, though this
change also works ok with earlier versions of MediaWiki core.
Bug: 65440
Change-Id: Icd9627bc6fec90216d91949492db74b547eba83e
---
M client/includes/api/ApiClientInfo.php
M client/tests/phpunit/includes/api/ApiClientInfoTest.php
2 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/04/133904/1
diff --git a/client/includes/api/ApiClientInfo.php
b/client/includes/api/ApiClientInfo.php
index b677080..cb4d714 100644
--- a/client/includes/api/ApiClientInfo.php
+++ b/client/includes/api/ApiClientInfo.php
@@ -3,6 +3,7 @@
namespace Wikibase;
use ApiBase;
+use ApiQuery;
use Wikibase\Client\WikibaseClient;
/**
@@ -25,10 +26,10 @@
/**
* @since 0.4
*
- * @param ApiBase $api
+ * @param ApiQuery $api
* @param string $moduleName
*/
- public function __construct( $api, $moduleName ) {
+ public function __construct( ApiQuery $api, $moduleName ) {
parent::__construct( $api, $moduleName, 'wb' );
// @todo inject this instead of using singleton here
diff --git a/client/tests/phpunit/includes/api/ApiClientInfoTest.php
b/client/tests/phpunit/includes/api/ApiClientInfoTest.php
index 1536c75..3dd37bf 100644
--- a/client/tests/phpunit/includes/api/ApiClientInfoTest.php
+++ b/client/tests/phpunit/includes/api/ApiClientInfoTest.php
@@ -2,6 +2,7 @@
namespace Wikibase\Test;
+use ApiQuery;
use Wikibase\SettingsArray;
use Wikibase\ApiClientInfo;
@@ -36,8 +37,9 @@
$context = $this->apiContext->newTestContext( $request, $user );
$apiMain = new \ApiMain( $context, true );
+ $apiQuery = new ApiQuery( $apiMain, 'wikibase' );
- $apiModule = new ApiClientInfo( $apiMain, 'query' );
+ $apiModule = new ApiClientInfo( $apiQuery, 'query' );
$apiModule->setSettings( $settings );
return $apiModule;
--
To view, visit https://gerrit.wikimedia.org/r/133904
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd9627bc6fec90216d91949492db74b547eba83e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits