Skip to content

Commit b2f2e3c

Browse files
[HttpFoundation] Fix tests on PHP 8.2 (bis)
1 parent 32589ae commit b2f2e3c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Tests/Fixtures/response-functional/cookie_max_age.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ Array
66
[0] => Content-Type: text/plain; charset=utf-8
77
[1] => Cache-Control: no-cache, private
88
[2] => Date: Sat, 12 Nov 1955 20:04:00 GMT
9-
[3] => Set-Cookie: foo=bar; expires=Sat, 01-Jan-10000 02:46:40 GMT; Max-Age=%d; path=/
9+
[3] => Set-Cookie: foo=bar; expires=Sat, 01 Jan 10000 02:46:40 GMT; Max-Age=%d; path=/
1010
)
1111
shutdown

Tests/ResponseFunctionalTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public function testCookie($fixture)
4848
}
4949

5050
$result = file_get_contents(sprintf('http://localhost:8054/%s.php', $fixture));
51+
$result = preg_replace_callback('/expires=[^;]++/', function ($m) { return str_replace('-', ' ', $m[0]); }, $result);
5152
$this->assertStringMatchesFormatFile(__DIR__.sprintf('/Fixtures/response-functional/%s.expected', $fixture), $result);
5253
}
5354

0 commit comments

Comments
 (0)