PHP Class Neos\Flow\Tests\Unit\Http\CookieTest

Inheritance: extends Neos\Flow\Tests\UnitTestCase
Show file Open project: neos/flow-development-collection

Public Methods

Method Description
constructorAcceptsValidCookieNames ( string $cookieName )
constructorThrowsExceptionOnInvalidCookieNames ( string $cookieName )
constructorThrowsExceptionOnInvalidDomain ( mixed $domain )
constructorThrowsExceptionOnInvalidExpiresParameter ( mixed $parameter )
constructorThrowsExceptionOnInvalidMaximumAgeParameter ( )
constructorThrowsExceptionOnInvalidPath ( mixed $path )
cookiesAndTheirStringRepresentations ( ) : array Data provider with cookies and their expected string representation.
createCookieFromRawAssumesDefaultPathIfNoLeadingSlashIsPresent ( )
createCookieFromRawAssumesExpiryDateZeroIfItCannotBeParsed ( )
createCookieFromRawDoesntCareAboutUnkownAttributeValues ( )
createCookieFromRawIgnoresDomainAttributeIfValueIsEmpty ( )
createCookieFromRawIgnoresMaxAgeIfInvalid ( )
createCookieFromRawLowerCasesDomainName ( )
createCookieFromRawParsesExpiryDateCorrectly ( )
createCookieFromRawParsesMaxAgeCorrectly ( )
createCookieFromRawRemovesLeadingDotForDomainIfPresent ( )
createCookieFromRawReturnsNullIfBasicNameOrValueAreNotSatisfied ( )
createCookieFromRawSetsHttpOnlyIfPresent ( )
createCookieFromRawSetsSecureIfPresent ( )
createCookieFromRawUsesPathCorrectly ( )
getDomainReturnsDomain ( )
getExpiresAlwaysReturnsAUnixTimestamp ( )
getMaximumAgeReturnsTheMaximumAge ( )
getPathReturnsPath ( )
getValueReturnsTheSetValue ( )
invalidCookieNames ( ) : array
invalidDomains ( ) : array
invalidExpiresParameters ( ) : array
invalidPaths ( ) : array
isExpiredTellsIfTheCookieIsExpired ( )
isHttpOnlyReturnsHttpOnlyFlag ( )
isSecureReturnsSecureFlag ( )
stringRepresentationOfCookieIsValidSetCookieFieldValue ( Cookie $cookie, string $expectedString ) : void Checks if the Cookie cast to a string equals the expected string which can be used as a value for the Set-Cookie header.
validCookieNames ( ) : array

Method Details

constructorAcceptsValidCookieNames() public method

public constructorAcceptsValidCookieNames ( string $cookieName )
$cookieName string

constructorThrowsExceptionOnInvalidCookieNames() public method

public constructorThrowsExceptionOnInvalidCookieNames ( string $cookieName )
$cookieName string

constructorThrowsExceptionOnInvalidDomain() public method

constructorThrowsExceptionOnInvalidExpiresParameter() public method

constructorThrowsExceptionOnInvalidMaximumAgeParameter() public method

constructorThrowsExceptionOnInvalidPath() public method

cookiesAndTheirStringRepresentations() public method

Data provider with cookies and their expected string representation.

createCookieFromRawAssumesDefaultPathIfNoLeadingSlashIsPresent() public method

createCookieFromRawAssumesExpiryDateZeroIfItCannotBeParsed() public method

createCookieFromRawDoesntCareAboutUnkownAttributeValues() public method

createCookieFromRawIgnoresDomainAttributeIfValueIsEmpty() public method

createCookieFromRawIgnoresMaxAgeIfInvalid() public method

createCookieFromRawLowerCasesDomainName() public method

createCookieFromRawParsesExpiryDateCorrectly() public method

createCookieFromRawParsesMaxAgeCorrectly() public method

createCookieFromRawRemovesLeadingDotForDomainIfPresent() public method

createCookieFromRawReturnsNullIfBasicNameOrValueAreNotSatisfied() public method

createCookieFromRawSetsHttpOnlyIfPresent() public method

createCookieFromRawSetsSecureIfPresent() public method

createCookieFromRawUsesPathCorrectly() public method

getDomainReturnsDomain() public method

getExpiresAlwaysReturnsAUnixTimestamp() public method

getMaximumAgeReturnsTheMaximumAge() public method

getPathReturnsPath() public method

public getPathReturnsPath ( )

getValueReturnsTheSetValue() public method

invalidCookieNames() public method

public invalidCookieNames ( ) : array
return array

invalidDomains() public method

public invalidDomains ( ) : array
return array

invalidExpiresParameters() public method

public invalidExpiresParameters ( ) : array
return array

invalidPaths() public method

public invalidPaths ( ) : array
return array

isExpiredTellsIfTheCookieIsExpired() public method

isHttpOnlyReturnsHttpOnlyFlag() public method

isSecureReturnsSecureFlag() public method

stringRepresentationOfCookieIsValidSetCookieFieldValue() public method

Checks if the Cookie cast to a string equals the expected string which can be used as a value for the Set-Cookie header.
public stringRepresentationOfCookieIsValidSetCookieFieldValue ( Cookie $cookie, string $expectedString ) : void
$cookie Neos\Flow\Http\Cookie
$expectedString string
return void

validCookieNames() public method

public validCookieNames ( ) : array
return array