MediaWiki
1.33.0
|
Media MimeAnalyzer. More...
Public Member Functions | |
doGuessMimeType (array $parameters=[]) | |
providerImproveTypeFromExtension () | |
setUp () | |
testImproveTypeFromExtension ( $ext, $oldMime, $expectedMime) | |
providerImproveTypeFromExtension More... | |
testMP3AsAudio () | |
Test to make sure that mp3 files are detected as audio type. More... | |
testMP3NoID3RecognizeMPEG1 () | |
Test to make sure that MP3 without id3 tag is recognized (MPEG-1 sample rates) More... | |
testMP3NoID3RecognizeMPEG2 () | |
Test to make sure that MP3 without id3 tag is recognized (MPEG-2 sample rates) More... | |
testMP3NoID3RecognizeMPEG2_5 () | |
Test to make sure that MP3 without id3 tag is recognized (MPEG-2.5 sample rates) More... | |
testMP3WithID3Recognize () | |
Test to make sure that MP3 with id3 tag is recognized. More... | |
testOggRecognize () | |
Test to make sure that encoder=ffmpeg2theora doesn't trigger MEDIATYPE_VIDEO (T65584) More... | |
testOpusRecognize () | |
Test to make sure that Opus audio files don't trigger MEDIATYPE_MULTIMEDIA (bug T151352) More... | |
testZipInDoc () | |
A ZIP file embedded in the middle of a .doc file is still a Word Document. More... | |
Private Attributes | |
MimeAnalyzer | $mimeAnalyzer |
Media MimeAnalyzer.
Definition at line 6 of file MimeAnalyzerTest.php.
MimeAnalyzerTest::doGuessMimeType | ( | array | $parameters = [] | ) |
Definition at line 30 of file MimeAnalyzerTest.php.
Referenced by testMP3NoID3RecognizeMPEG1(), testMP3NoID3RecognizeMPEG2(), testMP3NoID3RecognizeMPEG2_5(), testMP3WithID3Recognize(), and testZipInDoc().
MimeAnalyzerTest::providerImproveTypeFromExtension | ( | ) |
Definition at line 48 of file MimeAnalyzerTest.php.
MimeAnalyzerTest::setUp | ( | ) |
Definition at line 13 of file MimeAnalyzerTest.php.
References $IP.
MimeAnalyzerTest::testImproveTypeFromExtension | ( | $ext, | |
$oldMime, | |||
$expectedMime | |||
) |
providerImproveTypeFromExtension
string | $ext | File extension (no leading dot) |
string | $oldMime | Initially detected MIME |
string | $expectedMime | MIME type after taking extension into account |
Definition at line 43 of file MimeAnalyzerTest.php.
References $ext.
MimeAnalyzerTest::testMP3AsAudio | ( | ) |
Test to make sure that mp3 files are detected as audio type.
Definition at line 90 of file MimeAnalyzerTest.php.
References $file, and MEDIATYPE_AUDIO.
MimeAnalyzerTest::testMP3NoID3RecognizeMPEG1 | ( | ) |
Test to make sure that MP3 without id3 tag is recognized (MPEG-1 sample rates)
Definition at line 108 of file MimeAnalyzerTest.php.
References $file, and doGuessMimeType().
MimeAnalyzerTest::testMP3NoID3RecognizeMPEG2 | ( | ) |
Test to make sure that MP3 without id3 tag is recognized (MPEG-2 sample rates)
Definition at line 117 of file MimeAnalyzerTest.php.
References $file, and doGuessMimeType().
MimeAnalyzerTest::testMP3NoID3RecognizeMPEG2_5 | ( | ) |
Test to make sure that MP3 without id3 tag is recognized (MPEG-2.5 sample rates)
Definition at line 126 of file MimeAnalyzerTest.php.
References $file, and doGuessMimeType().
MimeAnalyzerTest::testMP3WithID3Recognize | ( | ) |
Test to make sure that MP3 with id3 tag is recognized.
Definition at line 99 of file MimeAnalyzerTest.php.
References $file, and doGuessMimeType().
MimeAnalyzerTest::testOggRecognize | ( | ) |
Test to make sure that encoder=ffmpeg2theora doesn't trigger MEDIATYPE_VIDEO (T65584)
Definition at line 71 of file MimeAnalyzerTest.php.
References MEDIATYPE_AUDIO.
MimeAnalyzerTest::testOpusRecognize | ( | ) |
Test to make sure that Opus audio files don't trigger MEDIATYPE_MULTIMEDIA (bug T151352)
Definition at line 81 of file MimeAnalyzerTest.php.
References MEDIATYPE_AUDIO.
MimeAnalyzerTest::testZipInDoc | ( | ) |
A ZIP file embedded in the middle of a .doc file is still a Word Document.
Definition at line 135 of file MimeAnalyzerTest.php.
References $file, and doGuessMimeType().
|
private |
Definition at line 11 of file MimeAnalyzerTest.php.