function ToolkitGdTest::testGdFunctionsExist
Same name in other branches
- 10 core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php \Drupal\KernelTests\Core\Image\ToolkitGdTest::testGdFunctionsExist()
- 11.x core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php \Drupal\KernelTests\Core\Image\ToolkitGdTest::testGdFunctionsExist()
Tests that GD functions for the image type are available.
@dataProvider providerSupportedImageTypes
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Image/ ToolkitGdTest.php, line 411
Class
- ToolkitGdTest
- Tests for the GD image toolkit.
Namespace
Drupal\KernelTests\Core\ImageCode
public function testGdFunctionsExist(int $type) : void {
$extension = image_type_to_extension($type, FALSE);
$this->assertTrue(function_exists("imagecreatefrom{$extension}"), "imagecreatefrom{$extension} should exist.");
$this->assertTrue(function_exists("image{$extension}"), "image{$extension} should exist.");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.