function ToolkitGdTest::testGetRequirements

Same name in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php \Drupal\KernelTests\Core\Image\ToolkitGdTest::testGetRequirements()

@covers ::getRequirements

File

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

Class

ToolkitGdTest
Tests for the GD image toolkit.

Namespace

Drupal\KernelTests\Core\Image

Code

public function testGetRequirements() : void {
    $this->assertEquals([
        'version' => [
            'title' => t('GD library'),
            'value' => gd_info()['GD Version'],
            'description' => t("Supported image file formats: %formats.", [
                '%formats' => implode(', ', [
                    'GIF',
                    'JPEG',
                    'PNG',
                    'WEBP',
                ]),
            ]),
        ],
    ], $this->imageFactory
        ->get()
        ->getToolkit()
        ->getRequirements());
}

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