function ImageTest::testGetMimeType

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testGetMimeType()
  2. 8.9.x core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testGetMimeType()
  3. 10 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testGetMimeType()

Tests \Drupal\Core\Image\Image::getMimeType().

File

core/tests/Drupal/Tests/Core/Image/ImageTest.php, line 188

Class

ImageTest
Tests the image class.

Namespace

Drupal\Tests\Core\Image

Code

public function testGetMimeType() : void {
    $this->getTestImage(FALSE);
    $this->assertEquals('image/png', $this->image
        ->getMimeType());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.