function ToolkitGdTest::testGetRequirements

Same name in other branches
  1. 10 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 515

Class

ToolkitGdTest
Tests for the GD image toolkit.

Namespace

Drupal\KernelTests\Core\Image

Code

public function testGetRequirements() : void {
    $this->assertEquals([
        'version' => [
            'title' => 'GD library',
            'value' => gd_info()['GD Version'],
            'description' => sprintf("Supported image file formats: %s.", 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.