Skip to content

Commit 8a91a72

Browse files
author
Peter Bouwdewijn
committed
Fix #67 Use fixed expires date string. +100 years should suffice.
1 parent 65d6c9e commit 8a91a72

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

spec/CookiePluginSpec.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,7 @@ function it_saves_cookie(RequestInterface $request, ResponseInterface $response,
146146

147147
$response->hasHeader('Set-Cookie')->willReturn(true);
148148
$response->getHeader('Set-Cookie')->willReturn([
149-
sprintf(
150-
'cookie=value; expires=%s; Max-Age=60; path=/; domain=test.com; secure; HttpOnly',
151-
(new \DateTime())->add(
152-
new \DateInterval('PT60S')
153-
)->format(\DateTime::COOKIE)
154-
)
149+
'cookie=value; expires=Wednesday, 31-Mar-2116 06:34:54 UTC; Max-Age=60; path=/; domain=test.com; secure; HttpOnly',
155150
]);
156151

157152
$request->getUri()->willReturn($uri);

0 commit comments

Comments
 (0)