Addshore has uploaded a new change for review.

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

Change subject: Remove use of deprecated TestUser->user
......................................................................

Remove use of deprecated TestUser->user

Change-Id: Ia1ffbfd75778f797c4f8451182c94024178dff1f
---
M repo/tests/phpunit/includes/api/BotEditTest.php
M repo/tests/phpunit/includes/api/IndependentWikibaseApiTestCase.php
M repo/tests/phpunit/includes/api/WikibaseApiTestCase.php
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/23/230123/1

diff --git a/repo/tests/phpunit/includes/api/BotEditTest.php 
b/repo/tests/phpunit/includes/api/BotEditTest.php
index a623a1c..58b9939 100644
--- a/repo/tests/phpunit/includes/api/BotEditTest.php
+++ b/repo/tests/phpunit/includes/api/BotEditTest.php
@@ -129,7 +129,7 @@
                        $params['fromid'] = EntityTestHelper::getId( 
$params['fromid'] );
                        $params['toid'] = EntityTestHelper::getId( 
$params['toid'] );
                }
-               list( $result, , ) = $this->doApiRequestWithToken( $params, 
null, self::$users['wbbot']->user );
+               list( $result, , ) = $this->doApiRequestWithToken( $params, 
null, self::$users['wbbot']->getUser() );
 
                // -- check the result 
------------------------------------------------
                $this->assertArrayHasKey( 'success', $result, "Missing 
'success' marker in response." );
@@ -153,7 +153,7 @@
                );
 
                //@todo this really makes this test slow, is there a better way?
-               $rcResult = $this->doApiRequest( $rcRequest, null, false, 
self::$users['wbbot']->user );
+               $rcResult = $this->doApiRequest( $rcRequest, null, false, 
self::$users['wbbot']->getUser() );
 
                // -- check the recent changes result 
---------------------------------
                $this->assertArrayHasKey( 'query', $rcResult[0], "Must have a 
'query' key in the result from the API" );
diff --git a/repo/tests/phpunit/includes/api/IndependentWikibaseApiTestCase.php 
b/repo/tests/phpunit/includes/api/IndependentWikibaseApiTestCase.php
index 6d4b5de..553ce9f 100644
--- a/repo/tests/phpunit/includes/api/IndependentWikibaseApiTestCase.php
+++ b/repo/tests/phpunit/includes/api/IndependentWikibaseApiTestCase.php
@@ -32,7 +32,7 @@
                        array( 'wbeditor' )
                );
 
-               $this->setMwGlobals( 'wgUser', self::$users['wbeditor']->user );
+               $this->setMwGlobals( 'wgUser', 
self::$users['wbeditor']->getUser() );
 
                if ( !$isSetup ) {
                        //TODO remove me once everything that needs this is 
overridden
diff --git a/repo/tests/phpunit/includes/api/WikibaseApiTestCase.php 
b/repo/tests/phpunit/includes/api/WikibaseApiTestCase.php
index 7505fef..fa475da 100644
--- a/repo/tests/phpunit/includes/api/WikibaseApiTestCase.php
+++ b/repo/tests/phpunit/includes/api/WikibaseApiTestCase.php
@@ -58,7 +58,7 @@
 
                ApiTestCase::$users['wbeditor'] = self::$wbTestUser;
 
-               $this->setMwGlobals( 'wgUser', self::$users['wbeditor']->user );
+               $this->setMwGlobals( 'wgUser', 
self::$users['wbeditor']->getUser() );
                $this->setMwGlobals( 'wgGroupPermissions', array( '*' => array(
                        'property-create' => true,
                        'createpage' => true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1ffbfd75778f797c4f8451182c94024178dff1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <addshorew...@gmail.com>

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

Reply via email to