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

List of all members.

Public Member Functions

 setUp ()

Static Public Attributes

static $users

Protected Member Functions

 doApiRequest ($params, $session=null, $appendModule=false, $user=null)
 doApiRequestWithToken ($params, $session, $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)

Protected Attributes

 $apiContext

Static Protected Attributes

static $apiUrl

Detailed Description

Definition at line 3 of file ApiTestCase.php.


Member Function Documentation

ApiTestCase::doApiRequestWithToken ( params,
session,
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:
$params,:key-value API params
$session,:session array
$userString|null A User object for the context

Definition at line 75 of file ApiTestCase.php.

References $user, and doApiRequest().

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

Here is the call graph for this function:

Here is the caller graph for this function:

ApiTestCase::doLogin ( ) [protected]

Definition at line 87 of file ApiTestCase.php.

References doApiRequest().

Referenced by ApiBlockTest\setUp(), ApiPurgeTest\setUp(), ApiQueryTest\setUp(), and ApiWatchTest\setUp().

Here is the call graph for this function:

Here is the caller graph for this function:

ApiTestCase::getTokenList ( user) [protected]

Definition at line 105 of file ApiTestCase.php.

References $user, and doApiRequest().

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

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented from MediaWikiLangTestCase.

Reimplemented in ApiTestCaseUpload, ApiWatchTest, UploadFromUrlTest, ApiBlockTest, ApiPurgeTest, and ApiQueryTest.

Definition at line 15 of file ApiTestCase.php.

References $wgAuth, $wgContLang, $wgMemc, $wgServer, $wgUser, Language\factory(), and wfScript().

Here is the call graph for this function:


Member Data Documentation

ApiTestCase::$apiContext [protected]

Definition at line 13 of file ApiTestCase.php.

ApiTestCase::$apiUrl [static, protected]

Definition at line 8 of file ApiTestCase.php.

ApiTestCase::$users [static]

Definition at line 7 of file ApiTestCase.php.


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