Skip to content

Commit 3f2d715

Browse files
committed
Updating Freedesktop magic.db with most recent version.
* Re-enabling previously failing tests. * Re-check and updating comments on previosly failing tests.
1 parent 9e8150e commit 3f2d715

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

data/magic.db

1.69 KB
Binary file not shown.

tests/integration/Mime/Type/Magic/Adapter/FreedesktopShippedTest.php

+26-23
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,25 @@ public function testAnalyze() {
5252
'ms_word_snippet.doc' => 'application/msword', // audio/MP4A-LATM
5353
'xml_snippet.xml' => 'application/xml', // text/xml
5454

55-
/* Fail! */
56-
/*
57-
'opendocument_writer_snippet.odt' => 'application/vnd.oasis.opendocument.text', // application/zip
58-
'ms_word_snippet.docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', // application/zip
55+
// fails with detecting application/vnd.oasis.opendocument.graphics
56+
// 'opendocument_writer_snippet.odt' => 'application/vnd.oasis.opendocument.text',
57+
// fails with detecting application/zip
58+
// 'ms_word_snippet.docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
5959
'audio_mpeg_snippet.mp3' => 'audio/mpeg',
60-
'text_plain_snippet.txt' => 'text/plain',
61-
'css_snippet.css' => 'text/css',
62-
'javascript_snippet.js' => 'application/javascript',
63-
'text_xhtml_snippet.xhtml' => 'application/xhtml+xml', // text/xml
64-
'po_snippet.po' => 'text/x-gettext-translation',
65-
'text_pot_snippet.pot' => 'text/x-gettext-translation-template',
66-
'mo_snippet.mo' => 'application/x-gettext-translation',
67-
*/
60+
// fails with detecting video/x-ms-asf
61+
// 'text_plain_snippet.txt' => 'text/plain',
62+
// fails with detecting text/x-csrc
63+
// 'css_snippet.css' => 'text/css',
64+
// fails with detecting text/x-csrc
65+
// 'javascript_snippet.js' => 'application/javascript',
66+
// fails with detecting text/html
67+
// 'text_xhtml_snippet.xhtml' => 'application/xhtml+xml',
68+
// fails with detecting nothing
69+
// 'po_snippet.po' => 'text/x-gettext-translation',
70+
// fails with detecting nothing
71+
// 'text_pot_snippet.pot' => 'text/x-gettext-translation-template',
72+
// fails with detecting nothing
73+
// 'mo_snippet.mo' => 'application/x-gettext-translation',
6874

6975
'video_flash_snippet.flv' => 'video/x-flv',
7076
'audio_snippet.snd' => 'audio/basic',
@@ -75,18 +81,15 @@ public function testAnalyze() {
7581
'video_quicktime_snippet.mov' => 'video/quicktime',
7682
'video_ms_snippet.wmv' => 'video/x-ms-asf',
7783

78-
/* Fail! */
79-
/*
80-
'audio_snippet.aac' => 'audio/x-aac',
81-
'audio_ms_snippet.wma' => 'audio/x-ms-asf',
82-
'flac_snippet.flac' => 'audio/x-flac', // Fails only with freedesktop db
83-
*/
84+
// fails with detecting nothing
85+
// 'audio_snippet.aac' => 'audio/x-aac',
86+
// fails with detecting video/x-ms-asf
87+
// 'audio_ms_snippet.wma' => 'audio/x-ms-asf',
88+
'flac_snippet.flac' => 'audio/flac',
8489

85-
/* Fail! No data :( */
86-
/*
87-
'java_snippet.class' => 'application/x-java',
88-
'real_video_snippet.rm' => 'application/vnd.rn-realmedia'
89-
*/
90+
/* Fail! No data yet :( */
91+
// 'java_snippet.class' => 'application/x-java',
92+
// 'real_video_snippet.rm' => 'application/vnd.rn-realmedia'
9093
];
9194

9295
foreach ($files as $file => $mimeTypes) {

0 commit comments

Comments
 (0)