File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/Symfony/Component/Mime/Tests Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,12 @@ public function testCustomMimeTypes()
75
75
}
76
76
77
77
/**
78
- * PHP 8 detects .csv files as "application/csv" while PHP 7 returns "text/plain".
78
+ * PHP 8 detects .csv files as "application/csv" (or "text/csv", depending
79
+ * on your system) while PHP 7 returns "text/plain".
80
+ *
81
+ * "text/csv" is described by RFC 7111.
82
+ *
83
+ * @see https://datatracker.ietf.org/doc/html/rfc7111
79
84
*
80
85
* @requires PHP 8
81
86
*/
@@ -84,7 +89,7 @@ public function testCsvExtension()
84
89
$ mt = new MimeTypes ();
85
90
86
91
$ mime = $ mt ->guessMimeType (__DIR__ .'/Fixtures/mimetypes/abc.csv ' );
87
- $ this ->assertSame ( 'application/csv ' , $ mime );
92
+ $ this ->assertContains ( $ mime , [ 'application/csv ' , ' text/csv ' ] );
88
93
$ this ->assertSame (['csv ' ], $ mt ->getExtensions ($ mime ));
89
94
}
90
95
}
You can’t perform that action at this time.
0 commit comments