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

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, 7 insertions(+), 4 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  WikidataJenkins: Verified
  jenkins-bot: Verified



diff --git a/client/includes/api/ApiClientInfo.php 
b/client/includes/api/ApiClientInfo.php
index b677080..48f1f8c 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,11 +26,11 @@
        /**
         * @since 0.4
         *
-        * @param ApiBase $api
+        * @param ApiQuery $apiQuery
         * @param string $moduleName
         */
-       public function __construct( $api, $moduleName ) {
-               parent::__construct( $api, $moduleName, 'wb' );
+       public function __construct( ApiQuery $apiQuery, $moduleName ) {
+               parent::__construct( $apiQuery, $moduleName, 'wb' );
 
                // @todo inject this instead of using singleton here
                $this->settings = 
WikibaseClient::getDefaultInstance()->getSettings();
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: merged
Gerrit-Change-Id: Icd9627bc6fec90216d91949492db74b547eba83e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to