MediaWiki  REL1_20
ApiTestCase Class Reference
Inheritance diagram for ApiTestCase:
Collaboration diagram for ApiTestCase:

List of all members.

Public Member Functions

 setUp ()

Protected Member Functions

 doApiRequest (Array $params, Array $session=null, $appendModule=false, User $user=null)
 doApiRequestWithToken (Array $params, Array $session=null, User $user=null)
 Add an edit token to the API request This is cheating a bit -- we grab a token in the correct format and then add it to the pseudo-session and to the request, without actually requesting a "real" edit token.
 doLogin ()
 getTokenList ($user, $session=null)

Protected Attributes

ApiTestContext $apiContext

Static Protected Attributes

static $apiUrl

Detailed Description

Definition at line 3 of file ApiTestCase.php.


Member Function Documentation

ApiTestCase::doApiRequestWithToken ( Array $  params,
Array $  session = null,
User user = null 
) [protected]

Add an edit token to the API request This is cheating a bit -- we grab a token in the correct format and then add it to the pseudo-session and to the request, without actually requesting a "real" edit token.

Parameters:
$paramsArray: key-value API params
$sessionArray|null: session array
$userUser|null A User object for the context

Definition at line 86 of file ApiTestCase.php.

Referenced by ApiEditPageTest\testEdit(), ApiUploadTest\testUpload(), ApiUploadTest\testUploadChunks(), ApiUploadTest\testUploadMissingParams(), ApiUploadTest\testUploadSameContent(), ApiUploadTest\testUploadSameFileName(), ApiUploadTest\testUploadStash(), and ApiUploadTest\testUploadZeroLength().

ApiTestCase::getTokenList ( user,
session = null 
) [protected]

Definition at line 122 of file ApiTestCase.php.

References $user, and doApiRequest().

Referenced by ApiBlockTest\getTokens(), ApiWatchTest\getTokens(), and ApiTest\runTokenTest().


Member Data Documentation

ApiTestContext ApiTestCase::$apiContext [protected]

Definition at line 8 of file ApiTestCase.php.

ApiTestCase::$apiUrl [static, protected]

Definition at line 4 of file ApiTestCase.php.


The documentation for this class was generated from the following file: