1 file.test FileUnitTestCase::testMimeTypeMappings()

Regression tests for core issue http://backdrop.org/node/1239376.

File

core/modules/file/tests/file.test, line 1845
Tests for file.module.

Class

FileUnitTestCase
Tests basic file entity functionality.

Code

function testMimeTypeMappings() {
  $tests = array(
    'public://test.ogg' => 'audio/ogg',
    'public://test.mkv' => 'video/x-m4v',
    'public://test.mka' => 'audio/x-matroska',
    'public://test.mkv' => 'video/x-matroska',
    'public://test.webp' => 'image/webp',
  );
  foreach ($tests as $input => $expected) {
    $this->assertEqual(file_get_mimetype($input), $expected);
  }
}