20 $this->apiContext->setUser(
$wgUser );
29 $token =
'invalid token';
32 $this->assertTrue(
$wgUser->isLoggedIn(),
'not logged out' );
39 $this->assertTrue(
$wgUser->isLoggedIn(),
'sanity check' );
42 $this->assertFalse(
$wgUser->isLoggedIn() );
48 $this->assertTrue(
$wgUser->isLoggedIn(),
'sanity check' );
54 $this->assertFalse(
$wgUser->isLoggedIn() );
64 $this->assertArrayNotHasKey(
'warnings', $retToken );
66 return $retToken[0][
'query'][
'tokens'][
'csrftoken'];
72 'token' => $logoutToken
if(! $wgDBerrorLogTZ) $wgRequest
testUserLogoutWithWebToken()
doUserLogout( $logoutToken)
getUserCsrfTokenFromApi()
doApiRequest(array $params, array $session=null, $appendModule=false, User $user=null)
Does the API request and returns the result.
setExpectedApiException( $msg, $code=null, array $data=null, $httpCode=0)
Expect an ApiUsageException to be thrown with the given parameters, which are the same as ApiUsageExc...