MediaWiki REL1_32
|
Media MimeAnalyzer. More...
Public Member Functions | |
doGuessMimeType (array $parameters=[]) | |
providerImproveTypeFromExtension () | |
setUp () | |
testImproveTypeFromExtension ( $ext, $oldMime, $expectedMime) | |
providerImproveTypeFromExtension | |
testMP3AsAudio () | |
Test to make sure that mp3 files are detected as audio type. | |
testMP3NoID3RecognizeMPEG1 () | |
Test to make sure that MP3 without id3 tag is recognized (MPEG-1 sample rates) | |
testMP3NoID3RecognizeMPEG2 () | |
Test to make sure that MP3 without id3 tag is recognized (MPEG-2 sample rates) | |
testMP3NoID3RecognizeMPEG2_5 () | |
Test to make sure that MP3 without id3 tag is recognized (MPEG-2.5 sample rates) | |
testMP3WithID3Recognize () | |
Test to make sure that MP3 with id3 tag is recognized. | |
testOggRecognize () | |
Test to make sure that encoder=ffmpeg2theora doesn't trigger MEDIATYPE_VIDEO (T65584) | |
testOpusRecognize () | |
Test to make sure that Opus audio files don't trigger MEDIATYPE_MULTIMEDIA (bug T151352) | |
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(), and testMP3WithID3Recognize().
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 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 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 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 doGuessMimeType().
MimeAnalyzerTest::testMP3WithID3Recognize | ( | ) |
Test to make sure that MP3 with id3 tag is recognized.
Definition at line 99 of file MimeAnalyzerTest.php.
References 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.
|
private |
Definition at line 11 of file MimeAnalyzerTest.php.