Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d9d155f

Browse files
committed
Add test to check for xml version using the guesser and ensure we guess appropriately.
1 parent b30f4c1 commit d9d155f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Binary file not shown.

src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ public function testGuessFileWithUnknownExtension()
6060
$this->assertEquals('application/octet-stream', MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/.unknownextension'));
6161
}
6262

63+
public function testGuessWithDuplicatedFiletype()
64+
{
65+
$this->assertEquals('application/vnd.openxmlformats-officedocument.wordprocessingml.document', MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/test.docx'));
66+
}
67+
6368
public function testGuessWithIncorrectPath()
6469
{
6570
$this->expectException('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException');

0 commit comments

Comments
 (0)