You are here

protected function ToolkitGdTest::checkRequirements in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Image/ToolkitGdTest.php \Drupal\system\Tests\Image\ToolkitGdTest::checkRequirements()

Checks the matching requirements for Test.

Return value

Array of errors containing a list of unmet requirements.

Overrides TestBase::checkRequirements

File

core/modules/system/src/Tests/Image/ToolkitGdTest.php, line 61
Contains \Drupal\system\Tests\Image\ToolkitGdTest.

Class

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

Namespace

Drupal\system\Tests\Image

Code

protected function checkRequirements() {

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