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. 10 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testGetMimeType()
  3. 11.x 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 180

Class

ImageTest
Tests the image class.

Namespace

Drupal\Tests\Core\Image

Code

public function testGetMimeType() {
    $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.