PHP Class eZ\Bundle\EzPublishRestBundle\Tests\Functional\SessionTest

Inheritance: extends TestCase
Show file Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
setUp ( )
testCreateSession ( ) : stdClass
testCreateSessionBadCredentials ( )
testDeleteSession ( )
testDeleteSessionExpired ( $session )
testDeleteSessionMissingCsrfToken ( ) CSRF needs to be tested as session handling bypasses the CsrfListener.
testLoginWithExistingFrontendSession ( )
testRefreshSession ( stdClass $session )
testRefreshSessionExpired ( )
testRefreshSessionMissingCsrfToken ( )

Protected Methods

Method Description
createDeleteRequest ( $session ) : Buzz\Message\Request
createRefreshRequest ( stdClass $session ) : Buzz\Message\Request

Private Methods

Method Description
assertHttpResponseDeletesSessionCookie ( $session, Buzz\Message\Response $response )
removeCsrfHeader ( Buzz\Message\Request $request ) Removes the CSRF token header from a $request.

Method Details

createDeleteRequest() protected method

protected createDeleteRequest ( $session ) : Buzz\Message\Request
$session
return Buzz\Message\Request

createRefreshRequest() protected method

protected createRefreshRequest ( stdClass $session ) : Buzz\Message\Request
$session stdClass
return Buzz\Message\Request

setUp() public method

public setUp ( )

testCreateSession() public method

public testCreateSession ( ) : stdClass
return stdClass The login request's response

testCreateSessionBadCredentials() public method

testDeleteSession() public method

public testDeleteSession ( )

testDeleteSessionExpired() public method

public testDeleteSessionExpired ( $session )

testDeleteSessionMissingCsrfToken() public method

CSRF needs to be tested as session handling bypasses the CsrfListener.

testLoginWithExistingFrontendSession() public method

testRefreshSession() public method

public testRefreshSession ( stdClass $session )
$session stdClass

testRefreshSessionExpired() public method

testRefreshSessionMissingCsrfToken() public method