r73917 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73916‎ | r73917 | r73918 >
Date:17:08, 28 September 2010
Author:demon
Status:ok
Tags:
Comment:
Use suite user/password rather than assuming WikiSysop
Modified paths:
  • /trunk/phase3/maintenance/tests/phpunit/includes/api/ApiWatchTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiWatchTest.php
@@ -37,8 +37,8 @@
3838 function testLogin() {
3939 $data = $this->doApiRequest( array(
4040 'action' => 'login',
41 - 'lgname' => 'WikiSysop',
42 - 'lgpassword' => 'none' ), $data );
 41+ 'lgname' => self::$userName,
 42+ 'lgpassword' => self::$passWord ), $data );
4343
4444 $this->assertArrayHasKey( "login", $data[0] );
4545 $this->assertArrayHasKey( "result", $data[0]['login'] );
@@ -48,8 +48,8 @@
4949 $data = $this->doApiRequest( array(
5050 'action' => 'login',
5151 "lgtoken" => $token,
52 - "lgname" => 'WikiSysop',
53 - "lgpassword" => 'none' ), $data );
 52+ "lgname" => self::$userName,
 53+ "lgpassword" => self::$passWord ), $data );
5454
5555 $this->assertArrayHasKey( "login", $data[0] );
5656 $this->assertArrayHasKey( "result", $data[0]['login'] );
@@ -183,7 +183,7 @@
184184 $data = $this->doApiRequest( array(
185185 'action' => 'rollback',
186186 'title' => 'Main Page',
187 - 'user' => 'WikiSysop',
 187+ 'user' => self::$userName,
188188 'token' => $pageinfo['rollbacktoken'],
189189 'watchlist' => 'watch' ), $data );
190190

Status & tagging log