Skip to content

Commit 3ae8e9c

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: sync message serializer code for forward-compatibility skip a test if the mime type detection feature will not work minor #47751 Norgweiang translations (ibonkonesa) fix overflow issue in WebPprofiler Forms panel
2 parents c695ce3 + e8aa505 commit 3ae8e9c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Tests/BinaryFileResponseTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\HttpFoundation\Tests;
1313

1414
use Symfony\Component\HttpFoundation\BinaryFileResponse;
15+
use Symfony\Component\HttpFoundation\File\File;
1516
use Symfony\Component\HttpFoundation\File\Stream;
1617
use Symfony\Component\HttpFoundation\Request;
1718
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
@@ -389,7 +390,15 @@ public function testPrepareNotAddingContentTypeHeaderIfNoContentResponse()
389390

390391
public function testContentTypeIsCorrectlyDetected()
391392
{
392-
$response = new BinaryFileResponse(__DIR__.'/File/Fixtures/test.gif');
393+
$file = new File(__DIR__.'/File/Fixtures/test.gif');
394+
395+
try {
396+
$file->getMimeType();
397+
} catch (\LogicException $e) {
398+
$this->markTestSkipped('Guessing the mime type is not possible');
399+
}
400+
401+
$response = new BinaryFileResponse($file);
393402

394403
$request = Request::create('/');
395404
$response->prepare($request);

0 commit comments

Comments
 (0)