Skip to content

Commit d1f7f2a

Browse files
minor #41614 [Mime] Fix CSV file mime type guess test for PHP 8.1 (alexandre-daubois)
This PR was merged into the 4.4 branch. Discussion ---------- [Mime] Fix CSV file mime type guess test for PHP 8.1 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Part of #41552 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | N/A I had the same result as `@derrabus` on my computer: `application/csv`. The CI returns `text/csv`. These two seem possible, although `text/csv` is described in [RFC 7111](https://datatracker.ietf.org/doc/html/rfc7111#page-3). (Oops little typo in title, thanks Alexander for the fix 🙏 ) Commits ------- 117cb8f085 [DependencyInjection] Fix CSV file mime type guess test for PHP 8.1
1 parent f9245d8 commit d1f7f2a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Tests/File/MimeType/MimeTypeTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ public function testGuessFileWithUnknownExtension()
6565

6666
public function testGuessWithDuplicatedFileType()
6767
{
68-
$type = MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/test.docx');
69-
$this->assertTrue(\in_array($type, ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'], true));
68+
$this->assertContains(MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/test.docx'), ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip']);
7069
}
7170

7271
public function testGuessWithIncorrectPath()

0 commit comments

Comments
 (0)