Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setResponseCache example
$response
=
new
Response
(
)
;
$expectedHeaders
=
$response
->headers->
all
(
)
;
$event
=
new
ResponseEvent
(
$this
->
createMock
(
HttpKernelInterface::
class
)
,
$request
,
HttpKernelInterface::MAIN_REQUEST,
$response
)
;
$subscriber
->
setResponseCache
(
$event
)
;
static
::
assertSame
(
$expectedHeaders
,
$response
->headers->
all
(
)
)
;
}
public
function
testNoAutoCacheControlHeader
(
)
: void
{
$subscriber
=
new
CacheResponseSubscriber
(
$this
->
createMock
(
CartService::
class
)
,
100,
true,
new
MaintenanceModeResolver
(
new
RequestStack
(
)
,
new
CoreMaintenanceModeResolver
(
new
EventDispatcher
(
)
)
)
,