function ToolkitTest::testLoad

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php \Drupal\FunctionalTests\Image\ToolkitTest::testLoad()
  2. 10 core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php \Drupal\KernelTests\Core\Image\ToolkitTest::testLoad()
  3. 11.x core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php \Drupal\KernelTests\Core\Image\ToolkitTest::testLoad()

Tests Image's methods.

File

core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php, line 66

Class

ToolkitTest
Tests the image toolkit.

Namespace

Drupal\KernelTests\Core\Image

Code

public function testLoad() {
    $image = $this->getImage();
    $this->assertInstanceOf(ImageInterface::class, $image);
    $this->assertEquals('test', $image->getToolkitId());
    $this->assertToolkitOperationsCalled([
        'parseFile',
    ]);
}

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