PHP 클래스 Neos\Flow\Tests\Unit\Session\SessionTest

상속: extends Neos\Flow\Tests\UnitTestCase
파일 보기 프로젝트 열기: neos/flow-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$httpRequest Neos\Flow\Http\Request
$httpResponse Neos\Flow\Http\Response
$mockBootstrap Neos\Flow\Core\Bootstrap
$mockObjectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$mockSecurityContext Neos\Flow\Security\Context | PHPUnit_Framework_MockObject_MockObject
$settings array

공개 메소드들

메소드 설명
aSessionCanBeTaggedAndBeRetrievedAgainByTheseTags ( )
addTagThrowsExceptionIfCalledOnNonStartedSession ( )
addTagThrowsExceptionIfTagIsNotValid ( )
autoExpireRemovesAllSessionDataOfTheExpiredSession ( )
autoExpireTriggersGarbageCollectionForExpiredSessions ( )
canBeResumedReturnsFalseIfNoSessionCookieExists ( )
canBeResumedReturnsFalseIfSessionIsExpiredAndExpiresASessionIfLastActivityIsOverTheLimit ( )
canBeResumedReturnsFalseIfTheSessionHasAlreadyBeenStarted ( )
closeAndShutdownObjectDoNotCloseARemoteSession ( )
closeFlagsTheSessionAsClosed ( )
constructCreatesARemoteSessionIfSessionIfIdentifierIsSpecified ( )
constructRequiresAStorageIdentifierIfASessionIdentifierWasGiven ( )
destroyRemovesAllSessionDataFromARemoteSession ( )
destroyRemovesAllSessionDataFromTheCurrentSessionButNotFromOtherSessions ( )
destroyThrowsExceptionIfSessionIsNotStarted ( )
garbageCollectionIsOmittedIfAnotherProcessIsAlreadyRunning ( )
garbageCollectionIsOmittedIfInactivityTimeoutIsSetToZero ( )
garbageCollectionOnlyRemovesTheDefinedMaximumNumberOfSessions ( )
getActiveSessionsReturnsAllActiveSessions ( )
getDataReturnsDataPreviouslySetWithPutData ( )
getDataThrowsExceptionIfSessionIsNotStarted ( )
getIdReturnsTheCurrentSessionIdentifier ( )
getLastActivityTimestampThrowsExceptionIfCalledOnNonStartedSession ( )
getTagsOnAResumedSessionReturnsTheTagsSetWithAddTag ( )
getTagsThrowsExceptionIfCalledOnNonStartedSession ( )
hasKeyThrowsExceptionIfCalledOnNonStartedSession ( )
isStartedReturnsFalseByDefault ( )
isStartedReturnsTrueAfterSessionHasBeenStarted ( )
lastActivityTimestampOfNewSessionIsSetAndStoredCorrectlyAndCanBeRetrieved ( )
putDataThrowsExceptionIfSessionIsNotStarted ( )
putDataThrowsExceptionIfTryingToPersistAResource ( )
remoteSessionUsesStorageIdentifierPassedToConstructor ( )
removeTagRemovesAPreviouslySetTag ( )
removeTagThrowsExceptionIfCalledOnNonStartedSession ( )
renewIdSetsANewSessionIdentifier ( )
renewIdThrowsExceptionIfCalledOnNonStartedSession ( )
renewIdThrowsExceptionIfCalledOnRemoteSession ( )
resumeOnAStartedSessionDoesNotDoAnyHarm ( ) Assures that no exception is thrown if a session is resumed.
resumeSetsSessionCookieInTheResponse ( )
sessionDataCanBeRetrievedEvenAfterSessionIdHasBeenRenewed ( )
sessionOnlyReusesTheSessionIdFromIncomingCookies ( ) This test asserts that the session cookie sent in the response doesn't just copy the data from the received session cookie (that is, domain, httponly etc) but creates a fresh Cookie object using the parameters derived from the settings.
setUp ( ) : void
shutdownChecksIfSessionStillExistsInStorageCacheBeforeWritingData ( )
shutdownCreatesSpecialDataEntryForSessionWithAuthenticatedAccounts ( )
startPutsACookieIntoTheHttpResponse ( )
startThrowsAnExceptionIfIncompatibleRequestHandlerIsUsed ( )
touchThrowsExceptionIfCalledOnNonStartedSession ( )
touchUpdatesLastActivityTimestampOfRemoteSession ( )
twoSessionsDontConflictIfUsingSameEntryIdentifiers ( )

보호된 메소드들

메소드 설명
createCache ( string $name ) : Neos\Cache\Frontend\VariableFrontend Creates a cache for testing

메소드 상세

aSessionCanBeTaggedAndBeRetrievedAgainByTheseTags() 공개 메소드

addTagThrowsExceptionIfCalledOnNonStartedSession() 공개 메소드

addTagThrowsExceptionIfTagIsNotValid() 공개 메소드

autoExpireRemovesAllSessionDataOfTheExpiredSession() 공개 메소드

autoExpireTriggersGarbageCollectionForExpiredSessions() 공개 메소드

canBeResumedReturnsFalseIfNoSessionCookieExists() 공개 메소드

canBeResumedReturnsFalseIfSessionIsExpiredAndExpiresASessionIfLastActivityIsOverTheLimit() 공개 메소드

canBeResumedReturnsFalseIfTheSessionHasAlreadyBeenStarted() 공개 메소드

closeAndShutdownObjectDoNotCloseARemoteSession() 공개 메소드

closeFlagsTheSessionAsClosed() 공개 메소드

constructCreatesARemoteSessionIfSessionIfIdentifierIsSpecified() 공개 메소드

constructRequiresAStorageIdentifierIfASessionIdentifierWasGiven() 공개 메소드

createCache() 보호된 메소드

Creates a cache for testing
protected createCache ( string $name ) : Neos\Cache\Frontend\VariableFrontend
$name string
리턴 Neos\Cache\Frontend\VariableFrontend

destroyRemovesAllSessionDataFromARemoteSession() 공개 메소드

destroyRemovesAllSessionDataFromTheCurrentSessionButNotFromOtherSessions() 공개 메소드

destroyThrowsExceptionIfSessionIsNotStarted() 공개 메소드

garbageCollectionIsOmittedIfAnotherProcessIsAlreadyRunning() 공개 메소드

garbageCollectionIsOmittedIfInactivityTimeoutIsSetToZero() 공개 메소드

garbageCollectionOnlyRemovesTheDefinedMaximumNumberOfSessions() 공개 메소드

getActiveSessionsReturnsAllActiveSessions() 공개 메소드

getDataReturnsDataPreviouslySetWithPutData() 공개 메소드

getDataThrowsExceptionIfSessionIsNotStarted() 공개 메소드

getIdReturnsTheCurrentSessionIdentifier() 공개 메소드

getLastActivityTimestampThrowsExceptionIfCalledOnNonStartedSession() 공개 메소드

getTagsOnAResumedSessionReturnsTheTagsSetWithAddTag() 공개 메소드

getTagsThrowsExceptionIfCalledOnNonStartedSession() 공개 메소드

hasKeyThrowsExceptionIfCalledOnNonStartedSession() 공개 메소드

isStartedReturnsFalseByDefault() 공개 메소드

isStartedReturnsTrueAfterSessionHasBeenStarted() 공개 메소드

lastActivityTimestampOfNewSessionIsSetAndStoredCorrectlyAndCanBeRetrieved() 공개 메소드

putDataThrowsExceptionIfSessionIsNotStarted() 공개 메소드

putDataThrowsExceptionIfTryingToPersistAResource() 공개 메소드

remoteSessionUsesStorageIdentifierPassedToConstructor() 공개 메소드

removeTagRemovesAPreviouslySetTag() 공개 메소드

removeTagThrowsExceptionIfCalledOnNonStartedSession() 공개 메소드

renewIdSetsANewSessionIdentifier() 공개 메소드

renewIdThrowsExceptionIfCalledOnNonStartedSession() 공개 메소드

renewIdThrowsExceptionIfCalledOnRemoteSession() 공개 메소드

resumeOnAStartedSessionDoesNotDoAnyHarm() 공개 메소드

Assures that no exception is thrown if a session is resumed.

resumeSetsSessionCookieInTheResponse() 공개 메소드

sessionDataCanBeRetrievedEvenAfterSessionIdHasBeenRenewed() 공개 메소드

sessionOnlyReusesTheSessionIdFromIncomingCookies() 공개 메소드

This test asserts that the session cookie sent in the response doesn't just copy the data from the received session cookie (that is, domain, httponly etc) but creates a fresh Cookie object using the parameters derived from the settings.

setUp() 공개 메소드

public setUp ( ) : void
리턴 void

shutdownChecksIfSessionStillExistsInStorageCacheBeforeWritingData() 공개 메소드

shutdownCreatesSpecialDataEntryForSessionWithAuthenticatedAccounts() 공개 메소드

startPutsACookieIntoTheHttpResponse() 공개 메소드

startThrowsAnExceptionIfIncompatibleRequestHandlerIsUsed() 공개 메소드

touchThrowsExceptionIfCalledOnNonStartedSession() 공개 메소드

touchUpdatesLastActivityTimestampOfRemoteSession() 공개 메소드

twoSessionsDontConflictIfUsingSameEntryIdentifiers() 공개 메소드

프로퍼티 상세

$httpRequest 보호되어 있는 프로퍼티

protected Request,Neos\Flow\Http $httpRequest
리턴 Neos\Flow\Http\Request

$httpResponse 보호되어 있는 프로퍼티

protected Response,Neos\Flow\Http $httpResponse
리턴 Neos\Flow\Http\Response

$mockBootstrap 보호되어 있는 프로퍼티

protected Bootstrap,Neos\Flow\Core $mockBootstrap
리턴 Neos\Flow\Core\Bootstrap

$mockObjectManager 보호되어 있는 프로퍼티

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $mockObjectManager
리턴 Neos\Flow\ObjectManagement\ObjectManagerInterface

$mockSecurityContext 보호되어 있는 프로퍼티

protected Context,Neos\Flow\Security|PHPUnit_Framework_MockObject_MockObject $mockSecurityContext
리턴 Neos\Flow\Security\Context | PHPUnit_Framework_MockObject_MockObject

$settings 보호되어 있는 프로퍼티

protected array $settings
리턴 array