function ToolkitGdTest::testMissingOperation
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php \Drupal\KernelTests\Core\Image\ToolkitGdTest::testMissingOperation()
- 8.9.x core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php \Drupal\KernelTests\Core\Image\ToolkitGdTest::testMissingOperation()
- 11.x core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php \Drupal\KernelTests\Core\Image\ToolkitGdTest::testMissingOperation()
Tests calling a missing image operation plugin.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Image/ ToolkitGdTest.php, line 504
Class
- ToolkitGdTest
- Tests for the GD image toolkit.
Namespace
Drupal\KernelTests\Core\ImageCode
public function testMissingOperation() : void {
// Load up a fresh image.
$image = $this->imageFactory
->get('core/tests/fixtures/files/image-test.png');
$this->assertTrue($image->isValid(), "Image 'image-test.png' after load should be valid, but it is not.");
// Try perform a missing toolkit operation.
$this->assertFalse($image->apply('missing_op', []), 'Calling a missing image toolkit operation plugin should fail, but it did not.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.