function MimeTypeMapTest::testHasMimeType
Same name and namespace in other branches
- main core/tests/Drupal/Tests/Core/File/MimeType/MimeTypeMapTest.php \Drupal\Tests\Core\File\MimeType\MimeTypeMapTest::testHasMimeType()
Tests has mime type.
File
-
core/
tests/ Drupal/ Tests/ Core/ File/ MimeType/ MimeTypeMapTest.php, line 79
Class
- MimeTypeMapTest
- Tests the MIME type mapper to extension.
Namespace
Drupal\Tests\Core\File\MimeTypeCode
public function testHasMimeType() : void {
$this->assertTrue($this->map
->hasMimeType('image/jpeg'));
$this->assertFalse($this->map
->hasMimeType('foo/bar'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.