8000 Use date format instead of RFC7231 constant of DateTimeInterface · symfony/symfony@c93c22a · GitHub
[go: up one dir, main page]

Skip to content

Commit c93c22a

Browse files
author
naitsirch
committed
Use date format instead of RFC7231 constant of DateTimeInterface
because of missing support in early versions of PHP 7 and 7.1
1 parent e3e952b commit c93c22a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ public function testStream()
376376
public function testPrepareNotAddingContentTypeHeaderIfNoContentResponse()
377377
{
378378
$request = Request::create('/');
379-
$request->headers->set('If-Modified-Since', (new \DateTimeImmutable('now'))->format(\DateTimeInterface::RFC7231));
379+
$request->headers->set('If-Modified-Since', date('D, d M Y H:i:s').' GMT');
380380

381381
$response = new BinaryFileResponse(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']);
382382
$response->setLastModified(new \DateTimeImmutable('-1 day'));

0 commit comments

Comments
 (0)
0