Addshore has uploaded a new change for review.
https://gerrit.wikimedia.org/r/77727
Change subject: Allow different users to login in Api tests
......................................................................
Allow different users to login in Api tests
Change-Id: I6f79416e4580ed8bf57836b78aa7027ea8f0d280
---
M tests/phpunit/includes/api/ApiTestCase.php
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/27/77727/1
diff --git a/tests/phpunit/includes/api/ApiTestCase.php
b/tests/phpunit/includes/api/ApiTestCase.php
index 1559bef..6d77227 100644
--- a/tests/phpunit/includes/api/ApiTestCase.php
+++ b/tests/phpunit/includes/api/ApiTestCase.php
@@ -139,11 +139,11 @@
}
}
- protected function doLogin() {
+ protected function doLogin( $user = 'sysop' ) {
$data = $this->doApiRequest( array(
'action' => 'login',
- 'lgname' => self::$users['sysop']->username,
- 'lgpassword' => self::$users['sysop']->password ) );
+ 'lgname' => self::$users[ $user ]->username,
+ 'lgpassword' => self::$users[ $user ]->password ) );
$token = $data[0]['login']['token'];
@@ -151,8 +151,8 @@
array(
'action' => 'login',
'lgtoken' => $token,
- 'lgname' => self::$users['sysop']->username,
- 'lgpassword' => self::$users['sysop']->password,
+ 'lgname' => self::$users[ $user ]->username,
+ 'lgpassword' => self::$users[ $user ]->password,
),
$data[2]
);
--
To view, visit https://gerrit.wikimedia.org/r/77727
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f79416e4580ed8bf57836b78aa7027ea8f0d280
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits