You are here

public function TestToolkit::getMimeType in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::getMimeType()
  2. 9 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::getMimeType()

Returns the MIME type of the image file.

Return value

string The MIME type of the image file, or an empty string if the image is invalid.

Overrides ImageToolkitInterface::getMimeType

File

core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php, line 223

Class

TestToolkit
Defines a Test toolkit for image manipulation within Drupal.

Namespace

Drupal\image_test\Plugin\ImageToolkit

Code

public function getMimeType() {
  return $this
    ->getType() ? image_type_to_mime_type($this
    ->getType()) : '';
}