|
MediaWiki
REL1_20
|


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 |
Definition at line 3 of file ApiTestCase.php.
| ApiTestCase::doApiRequest | ( | Array $ | params, |
| Array $ | session = null, |
||
| $ | appendModule = false, |
||
| User $ | user = null |
||
| ) | [protected] |
Reimplemented in UploadFromUrlTest.
Definition at line 41 of file ApiTestCase.php.
References $user, $wgUser, and RequestContext\getMain().
Referenced by ApiFormatTestBase\apiRequest(), doLogin(), getTokenList(), ApiTest\testApiListPages(), ApiTest\testApiLoginBadPass(), ApiTest\testApiLoginGoodPass(), ApiTest\testApiLoginNoName(), ApiBlockTest\testBlockingActionWithNoToken(), ApiWatchTest\testGetRollbackToken(), ApiBlockTest\testGetTokenUsingABlockingAction(), 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 | ( | 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.
| $params | Array: key-value API params |
| $session | Array|null: session array |
| $user | User|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::doLogin | ( | ) | [protected] |
Definition at line 104 of file ApiTestCase.php.
References doApiRequest().
Referenced by ApiBlockTest\setUp(), ApiQueryTest\setUp(), ApiPurgeTest\setUp(), ApiWatchTest\setUp(), and ApiEditPageTest\setUp().
| 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().
Reimplemented from MediaWikiLangTestCase.
Reimplemented in ApiEditPageTest, ApiTestCaseUpload, ApiWatchTest, ApiBlockTest, ApiPurgeTest, ApiQueryTest, and UploadFromUrlTest.
Definition at line 10 of file ApiTestCase.php.
References $wgContLang, $wgMemc, $wgUser, Language\factory(), and wfScript().
ApiTestContext ApiTestCase::$apiContext [protected] |
Definition at line 8 of file ApiTestCase.php.
ApiTestCase::$apiUrl [static, protected] |
Definition at line 4 of file ApiTestCase.php.