From: X! Date: Fri, 31 Dec 2010 22:34:20 +0000 (+0000) Subject: Forgot to change the other API tests X-Git-Tag: 1.31.0-rc.0~32942 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=2cc065167a0a42b07accb36031bdccfbc0f44d65;p=lhc%2Fweb%2Fwiklou.git Forgot to change the other API tests --- diff --git a/tests/phpunit/includes/api/ApiWatchTest.php b/tests/phpunit/includes/api/ApiWatchTest.php index 0742a0af4e..32e490811a 100644 --- a/tests/phpunit/includes/api/ApiWatchTest.php +++ b/tests/phpunit/includes/api/ApiWatchTest.php @@ -15,8 +15,8 @@ class ApiWatchTest extends ApiTestSetup { function testLogin() { $data = $this->doApiRequest( array( 'action' => 'login', - 'lgname' => self::$sysopUser->userName, - 'lgpassword' => self::$sysopUser->password ) ); + 'lgname' => $this->sysopUser->userName, + 'lgpassword' => $this->sysopUser->password ) ); $this->assertArrayHasKey( "login", $data[0] ); $this->assertArrayHasKey( "result", $data[0]['login'] ); @@ -26,8 +26,8 @@ class ApiWatchTest extends ApiTestSetup { $data = $this->doApiRequest( array( 'action' => 'login', "lgtoken" => $token, - "lgname" => self::$sysopUser->userName, - "lgpassword" => self::$sysopUser->password ), $data ); + "lgname" => $this->sysopUser->userName, + "lgpassword" => $this->sysopUser->password ), $data ); $this->assertArrayHasKey( "login", $data[0] ); $this->assertArrayHasKey( "result", $data[0]['login'] ); @@ -38,7 +38,7 @@ class ApiWatchTest extends ApiTestSetup { } function testGettingToken() { - foreach ( array( self::$user, self::$sysopUser ) as $user ) { + foreach ( array( $this->user, $this->sysopUser ) as $user ) { $this->getUserTokens( $user ); } } @@ -79,7 +79,7 @@ class ApiWatchTest extends ApiTestSetup { } function testGetToken() { - return $this->getUserTokens( self::$sysopUser ); + return $this->getUserTokens( $this->sysopUser ); } /**