MediaWiki
master
|
Protected Member Functions | |
doApiRequest (array $params, array $session=null, $appendModule=false, User $user=null) | |
Does the API request and returns the result. | |
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) | |
setUp () | |
setUp and tearDown should (where significant) happen in reverse order. | |
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] |
Does the API request and returns the result.
The returned value is an array containing
array | $params | |
array | null | $session | |
bool | $appendModule | |
User | null | $user |
Reimplemented in UploadFromUrlTest.
Definition at line 59 of file ApiTestCase.php.
Referenced by ApiFormatTestBase\apiRequest(), doLogin(), getTokenList(), ApiTest\testApiLoginBadPass(), ApiTest\testApiLoginGoodPass(), ApiTest\testApiLoginNoName(), ApiBlockTest\testBlockingActionWithNoToken(), ApiWatchTest\testGetRollbackToken(), ApiBlockTest\testGetTokenUsingABlockingAction(), ApiUploadTest\testLogin(), ApiBlockTest\testMakeNormalBlock(), ApiParseTest\testParseNonexistentPage(), 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 105 of file ApiTestCase.php.
Referenced by ApiEditPageTest\testEdit(), ApiEditPageTest\testEditAppend(), ApiEditPageTest\testNonTextEdit(), ApiUploadTest\testUpload(), ApiUploadTest\testUploadChunks(), ApiUploadTest\testUploadMissingParams(), ApiUploadTest\testUploadSameContent(), ApiUploadTest\testUploadSameFileName(), ApiUploadTest\testUploadStash(), and ApiUploadTest\testUploadZeroLength().
ApiTestCase::doLogin | ( | ) | [protected] |
Definition at line 123 of file ApiTestCase.php.
References array(), and doApiRequest().
Referenced by ApiBlockTest\setUp(), ApiParseTest\setUp(), ApiQueryTest\setUp(), ApiPurgeTest\setUp(), and ApiWatchTest\setUp().
ApiTestCase::getTokenList | ( | $ | user, |
$ | session = null |
||
) | [protected] |
Definition at line 141 of file ApiTestCase.php.
References $user, array(), and doApiRequest().
Referenced by ApiBlockTest\getTokens(), ApiWatchTest\getTokens(), and ApiTest\runTokenTest().
ApiTestCase::setUp | ( | ) | [protected] |
setUp and tearDown should (where significant) happen in reverse order.
Reimplemented from MediaWikiLangTestCase.
Reimplemented in ApiTestCaseUpload, ApiWatchTest, ApiBlockTest, ApiParseTest, ApiPurgeTest, ApiQueryTest, and UploadFromUrlTest.
Definition at line 10 of file ApiTestCase.php.
References $wgContLang, $wgMemc, $wgUser, array(), Language\factory(), global, ApiQueryInfo\resetTokenCache(), 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.