Documentation

HttpCacheTest extends HttpCacheTestCase
in package

Tags
group

time-sensitive

Table of Contents

$cache  : mixed
$cacheConfig  : mixed
$caches  : mixed
$catch  : mixed
$esi  : mixed
$kernel  : mixed
$request  : mixed
$response  : mixed
$responses  : mixed
$store  : Store
assertExceptionsAreCaught()  : mixed
assertExceptionsAreNotCaught()  : mixed
assertHttpKernelIsCalled()  : mixed
assertHttpKernelIsNotCalled()  : mixed
assertResponseOk()  : mixed
assertTraceContains()  : mixed
assertTraceNotContains()  : mixed
catchExceptions()  : mixed
clearDirectory()  : mixed
getForwardedData()  : mixed
getMetaStorageValues()  : mixed
getResponseDataThatMayBeServedStaleIfError()  : mixed
getResponseDataThatMustNotBeServedStaleIfError()  : mixed
getTrustedProxyData()  : mixed
request()  : mixed
setNextResponse()  : mixed
setNextResponses()  : mixed
testAssignsDefaultTtlWhenResponseHasNoFreshnessInformation()  : mixed
testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpired()  : mixed
testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpiredWithStatus304()  : mixed
testCachesResponsesWithALastModifiedValidatorButNoFreshnessInformation()  : mixed
testCachesResponsesWithAMaxAgeDirective()  : mixed
testCachesResponsesWithAnETagValidatorButNoFreshnessInformation()  : mixed
testCachesResponsesWithAnExpirationHeader()  : mixed
testCachesResponsesWithASMaxAgeDirective()  : mixed
testCachesResponsesWithExplicitNoCacheDirective()  : mixed
testClientIpIsAlwaysLocalhostForForwardedRequests()  : mixed
testDegradationWhenCacheLocked()  : mixed
testDoesCacheWithAuthorizationRequestHeaderAndPublicResponse()  : mixed
testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective()  : mixed
testDoesNotCacheOptionsRequest()  : mixed
testDoesNotCacheRequestsWithACookieHeader()  : mixed
testDoesNotCacheResponsesWithExplicitNoStoreDirective()  : mixed
testDoesNotCacheResponsesWithoutFreshnessInformationOrAValidator()  : mixed
testDoesNotCacheSomeStatusCodeResponses()  : mixed
testDoesNotCacheWithAuthorizationRequestHeaderAndNonPublicResponse()  : mixed
testDoesNotCacheWithCookieHeaderAndNonPublicResponse()  : mixed
testDoesNotReloadResponsesWhenAllowReloadIsSetFalseDefault()  : mixed
testDoesNotRevalidateFreshCacheEntryWhenEnableRevalidateOptionIsSetFalseDefault()  : mixed
testEsiCacheForceValidation()  : mixed
testEsiCacheForceValidationForHeadRequests()  : mixed
testEsiCacheRemoveValidationHeadersIfEmbeddedResponses()  : mixed
testEsiCacheRemoveValidationHeadersIfEmbeddedResponsesAndHeadRequest()  : mixed
testEsiCacheSendsTheLowestTtl()  : mixed
testEsiCacheSendsTheLowestTtlForHeadRequests()  : mixed
testEsiRecalculateContentLengthHeader()  : mixed
testEsiRecalculateContentLengthHeaderForHeadRequest()  : mixed
testFetchesFullResponseWhenCacheStaleAndNoValidatorsPresent()  : mixed
testFetchesResponseFromBackendWhenCacheMisses()  : mixed
testForwarderHeaderForForwardedRequests()  : mixed
testHitsCachedResponsesWithExpiresHeader()  : mixed
testHitsCachedResponseWithMaxAgeDirective()  : mixed
testHitsCachedResponseWithSMaxAgeDirective()  : mixed
testHttpCacheIsSetAsATrustedProxy()  : mixed
testIncrementsMaxAgeWhenNoDateIsSpecifiedEventWhenUsingETag()  : mixed
testInvalidatesCachedResponsesOnPost()  : mixed
testInvalidatesOnPostPutDeleteRequests()  : mixed
testPassesHeadRequestsThroughDirectlyOnPass()  : mixed
testPassesOnNonGetHeadRequests()  : mixed
testReloadsResponsesWhenCacheHitsButNoCacheRequestDirectivePresentWhenAllowReloadIsSetTrue()  : mixed
testReplacesCachedResponsesWhenValidationResultsInNon304Response()  : mixed
testRespondsWith304OnlyIfIfNoneMatchAndIfModifiedSinceBothMatch()  : mixed
testRespondsWith304WhenIfModifiedSinceMatchesLastModified()  : mixed
testRespondsWith304WhenIfNoneMatchMatchesETag()  : mixed
testResponsesThatMayBeUsedStaleIfError()  : mixed
testResponsesThatMustNotBeUsedStaleIfError()  : mixed
testRevalidatesFreshCacheEntryWhenMaxAgeRequestDirectiveIsExceededWhenAllowRevalidateOptionIsSetTrue()  : mixed
testRevalidatesResponsesWithNoCacheDirectiveEvenIfFresh()  : mixed
testSendsNoContentWhenFresh()  : mixed
testServesFromCacheWhenHeadersMatch()  : mixed
testServesResponseWhileFreshAndRevalidatesWithLastModifiedInformation()  : mixed
testShouldCatchExceptions()  : mixed
testShouldCatchExceptionsWhenReloadingAndNoCacheRequest()  : mixed
testShouldNotCatchExceptions()  : mixed
testStaleIfErrorMustNotResetLifetime()  : mixed
testStaleIfErrorWhenStrictSmaxageDisabled()  : mixed
testStoresMultipleResponsesWhenHeadersDiffer()  : mixed
testStoresResponsesWhenNoCacheRequestDirectivePresent()  : mixed
testTerminateDelegatesTerminationOnlyForTerminableInterface()  : mixed
testUsesCacheToRespondToHeadRequestsWhenFresh()  : mixed
testUsesOriginalRequestForSurrogate()  : mixed
testValidatesCachedResponsesUseSameHttpMethod()  : mixed
testValidatesCachedResponsesWithETagAndNoFreshnessInformation()  : mixed
testValidatesCachedResponsesWithLastModifiedAndNoFreshnessInformation()  : mixed
testValidatesPrivateResponsesCachedOnTheClient()  : mixed
setUp()  : mixed
tearDown()  : mixed

Properties

Methods

assertExceptionsAreCaught()

public assertExceptionsAreCaught() : mixed
Return values
mixed

assertExceptionsAreNotCaught()

public assertExceptionsAreNotCaught() : mixed
Return values
mixed

assertHttpKernelIsCalled()

public assertHttpKernelIsCalled() : mixed
Return values
mixed

assertHttpKernelIsNotCalled()

public assertHttpKernelIsNotCalled() : mixed
Return values
mixed

assertResponseOk()

public assertResponseOk() : mixed
Return values
mixed

assertTraceContains()

public assertTraceContains(mixed $trace) : mixed
Parameters
$trace : mixed
Return values
mixed

assertTraceNotContains()

public assertTraceNotContains(mixed $trace) : mixed
Parameters
$trace : mixed
Return values
mixed

catchExceptions()

public catchExceptions([mixed $catch = true ]) : mixed
Parameters
$catch : mixed = true
Return values
mixed

clearDirectory()

public static clearDirectory(mixed $directory) : mixed
Parameters
$directory : mixed
Return values
mixed

getForwardedData()

public getForwardedData() : mixed
Return values
mixed

getMetaStorageValues()

public getMetaStorageValues() : mixed
Return values
mixed

getResponseDataThatMayBeServedStaleIfError()

public getResponseDataThatMayBeServedStaleIfError() : mixed
Return values
mixed

getResponseDataThatMustNotBeServedStaleIfError()

public getResponseDataThatMustNotBeServedStaleIfError() : mixed
Return values
mixed

getTrustedProxyData()

public getTrustedProxyData() : mixed
Return values
mixed

request()

public request(mixed $method[, mixed $uri = '/' ][, mixed $server = [] ][, mixed $cookies = [] ][, mixed $esi = false ][, mixed $headers = [] ]) : mixed
Parameters
$method : mixed
$uri : mixed = '/'
$server : mixed = []
$cookies : mixed = []
$esi : mixed = false
$headers : mixed = []
Return values
mixed

setNextResponse()

public setNextResponse([mixed $statusCode = 200 ][, array<string|int, mixed> $headers = [] ][, mixed $body = 'Hello World' ][, Closure $customizer = null ]) : mixed
Parameters
$statusCode : mixed = 200
$headers : array<string|int, mixed> = []
$body : mixed = 'Hello World'
$customizer : Closure = null
Return values
mixed

setNextResponses()

public setNextResponses(mixed $responses) : mixed
Parameters
$responses : mixed
Return values
mixed

testAssignsDefaultTtlWhenResponseHasNoFreshnessInformation()

public testAssignsDefaultTtlWhenResponseHasNoFreshnessInformation() : mixed
Return values
mixed

testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpired()

public testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpired() : mixed
Return values
mixed

testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpiredWithStatus304()

public testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpiredWithStatus304() : mixed
Return values
mixed

testCachesResponsesWithALastModifiedValidatorButNoFreshnessInformation()

public testCachesResponsesWithALastModifiedValidatorButNoFreshnessInformation() : mixed
Return values
mixed

testCachesResponsesWithAMaxAgeDirective()

public testCachesResponsesWithAMaxAgeDirective() : mixed
Return values
mixed

testCachesResponsesWithAnETagValidatorButNoFreshnessInformation()

public testCachesResponsesWithAnETagValidatorButNoFreshnessInformation() : mixed
Return values
mixed

testCachesResponsesWithAnExpirationHeader()

public testCachesResponsesWithAnExpirationHeader() : mixed
Return values
mixed

testCachesResponsesWithASMaxAgeDirective()

public testCachesResponsesWithASMaxAgeDirective() : mixed
Return values
mixed

testCachesResponsesWithExplicitNoCacheDirective()

public testCachesResponsesWithExplicitNoCacheDirective() : mixed
Return values
mixed

testClientIpIsAlwaysLocalhostForForwardedRequests()

public testClientIpIsAlwaysLocalhostForForwardedRequests() : mixed
Return values
mixed

testDegradationWhenCacheLocked()

public testDegradationWhenCacheLocked() : mixed
Return values
mixed

testDoesCacheWithAuthorizationRequestHeaderAndPublicResponse()

public testDoesCacheWithAuthorizationRequestHeaderAndPublicResponse() : mixed
Return values
mixed

testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective()

public testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective() : mixed
Return values
mixed

testDoesNotCacheOptionsRequest()

public testDoesNotCacheOptionsRequest() : mixed
Return values
mixed

testDoesNotCacheRequestsWithACookieHeader()

public testDoesNotCacheRequestsWithACookieHeader() : mixed
Return values
mixed

testDoesNotCacheResponsesWithExplicitNoStoreDirective()

public testDoesNotCacheResponsesWithExplicitNoStoreDirective() : mixed
Return values
mixed

testDoesNotCacheResponsesWithoutFreshnessInformationOrAValidator()

public testDoesNotCacheResponsesWithoutFreshnessInformationOrAValidator() : mixed
Return values
mixed

testDoesNotCacheSomeStatusCodeResponses()

public testDoesNotCacheSomeStatusCodeResponses() : mixed
Return values
mixed

testDoesNotCacheWithAuthorizationRequestHeaderAndNonPublicResponse()

public testDoesNotCacheWithAuthorizationRequestHeaderAndNonPublicResponse() : mixed
Return values
mixed

testDoesNotCacheWithCookieHeaderAndNonPublicResponse()

public testDoesNotCacheWithCookieHeaderAndNonPublicResponse() : mixed
Return values
mixed

testDoesNotReloadResponsesWhenAllowReloadIsSetFalseDefault()

public testDoesNotReloadResponsesWhenAllowReloadIsSetFalseDefault() : mixed
Return values
mixed

testDoesNotRevalidateFreshCacheEntryWhenEnableRevalidateOptionIsSetFalseDefault()

public testDoesNotRevalidateFreshCacheEntryWhenEnableRevalidateOptionIsSetFalseDefault() : mixed
Return values
mixed

testEsiCacheForceValidation()

public testEsiCacheForceValidation() : mixed
Return values
mixed

testEsiCacheForceValidationForHeadRequests()

public testEsiCacheForceValidationForHeadRequests() : mixed
Return values
mixed

testEsiCacheRemoveValidationHeadersIfEmbeddedResponses()

public testEsiCacheRemoveValidationHeadersIfEmbeddedResponses() : mixed
Return values
mixed

testEsiCacheRemoveValidationHeadersIfEmbeddedResponsesAndHeadRequest()

public testEsiCacheRemoveValidationHeadersIfEmbeddedResponsesAndHeadRequest() : mixed
Return values
mixed

testEsiCacheSendsTheLowestTtl()

public testEsiCacheSendsTheLowestTtl() : mixed
Return values
mixed

testEsiCacheSendsTheLowestTtlForHeadRequests()

public testEsiCacheSendsTheLowestTtlForHeadRequests() : mixed
Return values
mixed

testEsiRecalculateContentLengthHeader()

public testEsiRecalculateContentLengthHeader() : mixed
Return values
mixed

testEsiRecalculateContentLengthHeaderForHeadRequest()

public testEsiRecalculateContentLengthHeaderForHeadRequest() : mixed
Return values
mixed

testFetchesFullResponseWhenCacheStaleAndNoValidatorsPresent()

public testFetchesFullResponseWhenCacheStaleAndNoValidatorsPresent() : mixed
Return values
mixed

testFetchesResponseFromBackendWhenCacheMisses()

public testFetchesResponseFromBackendWhenCacheMisses() : mixed
Return values
mixed

testForwarderHeaderForForwardedRequests()

public testForwarderHeaderForForwardedRequests(mixed $forwarded, mixed $expected) : mixed
Parameters
$forwarded : mixed
$expected : mixed
Tags
dataProvider

getForwardedData

Return values
mixed

testHitsCachedResponsesWithExpiresHeader()

public testHitsCachedResponsesWithExpiresHeader() : mixed
Return values
mixed

testHitsCachedResponseWithMaxAgeDirective()

public testHitsCachedResponseWithMaxAgeDirective() : mixed
Return values
mixed

testHitsCachedResponseWithSMaxAgeDirective()

public testHitsCachedResponseWithSMaxAgeDirective() : mixed
Return values
mixed

testHttpCacheIsSetAsATrustedProxy()

public testHttpCacheIsSetAsATrustedProxy(array<string|int, mixed> $existing) : mixed
Parameters
$existing : array<string|int, mixed>
Tags
dataProvider

getTrustedProxyData

Return values
mixed

testIncrementsMaxAgeWhenNoDateIsSpecifiedEventWhenUsingETag()

public testIncrementsMaxAgeWhenNoDateIsSpecifiedEventWhenUsingETag() : mixed
Return values
mixed

testInvalidatesCachedResponsesOnPost()

public testInvalidatesCachedResponsesOnPost() : mixed
Return values
mixed

testInvalidatesOnPostPutDeleteRequests()

public testInvalidatesOnPostPutDeleteRequests() : mixed
Return values
mixed

testPassesHeadRequestsThroughDirectlyOnPass()

public testPassesHeadRequestsThroughDirectlyOnPass() : mixed
Return values
mixed

testPassesOnNonGetHeadRequests()

public testPassesOnNonGetHeadRequests() : mixed
Return values
mixed

testReloadsResponsesWhenCacheHitsButNoCacheRequestDirectivePresentWhenAllowReloadIsSetTrue()

public testReloadsResponsesWhenCacheHitsButNoCacheRequestDirectivePresentWhenAllowReloadIsSetTrue() : mixed
Return values
mixed

testReplacesCachedResponsesWhenValidationResultsInNon304Response()

public testReplacesCachedResponsesWhenValidationResultsInNon304Response() : mixed
Return values
mixed

testRespondsWith304OnlyIfIfNoneMatchAndIfModifiedSinceBothMatch()

public testRespondsWith304OnlyIfIfNoneMatchAndIfModifiedSinceBothMatch() : mixed
Return values
mixed

testRespondsWith304WhenIfModifiedSinceMatchesLastModified()

public testRespondsWith304WhenIfModifiedSinceMatchesLastModified() : mixed
Return values
mixed

testRespondsWith304WhenIfNoneMatchMatchesETag()

public testRespondsWith304WhenIfNoneMatchMatchesETag() : mixed
Return values
mixed

testResponsesThatMayBeUsedStaleIfError()

public testResponsesThatMayBeUsedStaleIfError(mixed $responseHeaders[, mixed $sleepBetweenRequests = null ]) : mixed
Parameters
$responseHeaders : mixed
$sleepBetweenRequests : mixed = null
Tags
dataProvider

getResponseDataThatMayBeServedStaleIfError

Return values
mixed

testResponsesThatMustNotBeUsedStaleIfError()

public testResponsesThatMustNotBeUsedStaleIfError(mixed $responseHeaders[, mixed $sleepBetweenRequests = null ]) : mixed
Parameters
$responseHeaders : mixed
$sleepBetweenRequests : mixed = null
Tags
dataProvider

getResponseDataThatMustNotBeServedStaleIfError

Return values
mixed

testRevalidatesFreshCacheEntryWhenMaxAgeRequestDirectiveIsExceededWhenAllowRevalidateOptionIsSetTrue()

public testRevalidatesFreshCacheEntryWhenMaxAgeRequestDirectiveIsExceededWhenAllowRevalidateOptionIsSetTrue() : mixed
Return values
mixed

testRevalidatesResponsesWithNoCacheDirectiveEvenIfFresh()

public testRevalidatesResponsesWithNoCacheDirectiveEvenIfFresh() : mixed
Return values
mixed

testSendsNoContentWhenFresh()

public testSendsNoContentWhenFresh() : mixed
Return values
mixed

testServesFromCacheWhenHeadersMatch()

public testServesFromCacheWhenHeadersMatch() : mixed
Return values
mixed

testServesResponseWhileFreshAndRevalidatesWithLastModifiedInformation()

public testServesResponseWhileFreshAndRevalidatesWithLastModifiedInformation() : mixed
Return values
mixed

testShouldCatchExceptions()

public testShouldCatchExceptions() : mixed
Return values
mixed

testShouldCatchExceptionsWhenReloadingAndNoCacheRequest()

public testShouldCatchExceptionsWhenReloadingAndNoCacheRequest() : mixed
Return values
mixed

testShouldNotCatchExceptions()

public testShouldNotCatchExceptions() : mixed
Return values
mixed

testStaleIfErrorMustNotResetLifetime()

public testStaleIfErrorMustNotResetLifetime() : mixed
Return values
mixed

testStaleIfErrorWhenStrictSmaxageDisabled()

public testStaleIfErrorWhenStrictSmaxageDisabled() : mixed
Return values
mixed

testStoresMultipleResponsesWhenHeadersDiffer()

public testStoresMultipleResponsesWhenHeadersDiffer() : mixed
Return values
mixed

testStoresResponsesWhenNoCacheRequestDirectivePresent()

public testStoresResponsesWhenNoCacheRequestDirectivePresent() : mixed
Return values
mixed

testTerminateDelegatesTerminationOnlyForTerminableInterface()

public testTerminateDelegatesTerminationOnlyForTerminableInterface() : mixed
Return values
mixed

testUsesCacheToRespondToHeadRequestsWhenFresh()

public testUsesCacheToRespondToHeadRequestsWhenFresh() : mixed
Return values
mixed

testUsesOriginalRequestForSurrogate()

public testUsesOriginalRequestForSurrogate() : mixed
Return values
mixed

testValidatesCachedResponsesUseSameHttpMethod()

public testValidatesCachedResponsesUseSameHttpMethod() : mixed
Return values
mixed

testValidatesCachedResponsesWithETagAndNoFreshnessInformation()

public testValidatesCachedResponsesWithETagAndNoFreshnessInformation() : mixed
Return values
mixed

testValidatesCachedResponsesWithLastModifiedAndNoFreshnessInformation()

public testValidatesCachedResponsesWithLastModifiedAndNoFreshnessInformation() : mixed
Return values
mixed

testValidatesPrivateResponsesCachedOnTheClient()

public testValidatesPrivateResponsesCachedOnTheClient() : mixed
Return values
mixed

Search results