Test case for Opus file check so we don't regress!
Confirms the fix for T151352 that Opus files return
type 'audio' and not 'multimedia'.
Bug: T151352
Change-Id: Ib868793d90b60609ccec25726e6fbaa28bffebaf
$actualType = $this->mimeAnalyzer->getMediaType( $oggFile, 'application/ogg' );
$this->assertEquals( $actualType, MEDIATYPE_AUDIO );
}
+
+ /**
+ * Test to make sure that Opus audio files don't trigger
+ * MEDIATYPE_MULTIMEDIA (bug T151352)
+ */
+ function testOpusRecognize() {
+ $oggFile = __DIR__ . '/../../../data/media/say-test.opus';
+ $actualType = $this->mimeAnalyzer->getMediaType( $oggFile, 'application/ogg' );
+ $this->assertEquals( $actualType, MEDIATYPE_AUDIO );
+ }
}