MediaWiki
REL1_19
|
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 |
Definition at line 3 of file ApiTestCase.php.
ApiTestCase::doApiRequest | ( | $ | params, |
$ | session = null , |
||
$ | appendModule = false , |
||
$ | user = null |
||
) | [protected] |
Reimplemented in UploadFromUrlTest.
Definition at line 46 of file ApiTestCase.php.
References $user.
Referenced by ApiFormatTestBase\apiRequest(), doApiRequestWithToken(), doLogin(), getTokenList(), ApiTest\testApiListPages(), ApiTest\testApiLoginBadPass(), ApiTest\testApiLoginGoodPass(), ApiTest\testApiLoginNoName(), ApiWatchTest\testGetRollbackToken(), ApiUploadTest\testLogin(), ApiBlockTest\testMakeNormalBlock(), ApiPurgeTest\testPurgeMainPage(), ApiTest\testRunLogin(), ApiQueryTest\testTitlesAreRejectedIfInvalid(), ApiQueryTest\testTitlesGetNormalized(), ApiUploadTest\testUploadRequiresToken(), ApiWatchTest\testWatchClear(), ApiWatchTest\testWatchDelete(), ApiWatchTest\testWatchEdit(), ApiWatchTest\testWatchProtect(), and ApiWatchTest\testWatchRollback().
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.
$params,: | key-value API params |
$session,: | session array |
$user | String|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().
ApiTestCase::doLogin | ( | ) | [protected] |
Definition at line 87 of file ApiTestCase.php.
References doApiRequest().
Referenced by ApiBlockTest\setUp(), ApiPurgeTest\setUp(), ApiQueryTest\setUp(), and ApiWatchTest\setUp().
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().
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().
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.