Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
DefaultResponse example
$response
->
setCache
(
[
$directive
=> true
]
)
;
$this
->
assertTrue
(
$response
->headers->
hasCacheControlDirective
(
str_replace
(
'_', '-',
$directive
)
)
)
;
}
foreach
(
$directives
as
$directive
)
{
$response
->
setCache
(
[
$directive
=> false
]
)
;
$this
->
assertFalse
(
$response
->headers->
hasCacheControlDirective
(
str_replace
(
'_', '-',
$directive
)
)
)
;
}
$response
=
new
DefaultResponse
(
)
;
$options
=
[
'etag' => '"whatever"'
]
;
$response
->
setCache
(
$options
)
;
$this
->
assertSame
(
$response
->
getEtag
(
)
, '"whatever"'
)
;
}
public
function
testSendContent
(
)
{
$response
=
new
Response
(
'test response rendering', 200
)
;
ob_start
(
)
;