function ToolkitGdTest::checkRequirements

Overrides TestRequirementsTrait::checkRequirements

File

core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php, line 58

Class

ToolkitGdTest
Tests that core image manipulations work properly: scale, resize, rotate, crop, scale and crop, and desaturate.

Namespace

Drupal\KernelTests\Core\Image

Code

protected function checkRequirements() {
    // GD2 support is available.
    if (!function_exists('imagegd2')) {
        return [
            'Image manipulations for the GD toolkit cannot run because the GD toolkit is not available.',
        ];
    }
    return parent::checkRequirements();
}

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