function MimeTypeMapTest::testListMimeTypes
Same name and namespace in other branches
- main core/tests/Drupal/Tests/Core/File/MimeType/MimeTypeMapTest.php \Drupal\Tests\Core\File\MimeType\MimeTypeMapTest::testListMimeTypes()
Tests list mime types.
File
-
core/
tests/ Drupal/ Tests/ Core/ File/ MimeType/ MimeTypeMapTest.php, line 70
Class
- MimeTypeMapTest
- Tests the MIME type mapper to extension.
Namespace
Drupal\Tests\Core\File\MimeTypeCode
public function testListMimeTypes() : void {
$mimeTypes = $this->map
->listMimeTypes();
$this->assertContains('application/java-archive', $mimeTypes);
$this->assertContains('image/jpeg', $mimeTypes);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.