Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createDateTimeImmutableNow example
$now
=
$this
->
createDateTimeNow
(
)
;
$response
->
setExpires
(
$now
)
;
$this
->
assertEquals
(
$response
->
getExpires
(
)
->
getTimestamp
(
)
,
$now
->
getTimestamp
(
)
)
;
}
public
function
testSetExpiresWithImmutable
(
)
{
$response
=
new
Response
(
)
;
$now
=
$this
->
createDateTimeImmutableNow
(
)
;
$response
->
setExpires
(
$now
)
;
$this
->
assertEquals
(
$response
->
getExpires
(
)
->
getTimestamp
(
)
,
$now
->
getTimestamp
(
)
)
;
}
public
function
testSetLastModified
(
)
{
$response
=
new
Response
(
)
;
$response
->
setLastModified
(
$this
->
createDateTimeNow
(
)
)
;
$this
->
assertNotNull
(
$response
->
getLastModified
(
)
)
;