PHP Класс Neos\Flow\Tests\Unit\Session\SessionTest

Наследование: extends Neos\Flow\Tests\UnitTestCase
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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