class Failing

Same name in other branches
  1. 11.x core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/Operation/test/Failing.php \Drupal\image_test\Plugin\ImageToolkit\Operation\test\Failing

An image toolkit operation that throws a \RuntimeException.

Hierarchy

Expanded class hierarchy of Failing

2 string references to 'Failing'
ToolkitTest::testFailingOperation in core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php
Tests calling a failing image operation plugin.
ToolkitTestTrait::assertToolkitOperationsCalled in core/tests/Drupal/Tests/Traits/Core/Image/ToolkitTestTrait.php
Assert that all of the specified image toolkit operations were called once.

File

core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/Operation/test/Failing.php, line 11

Namespace

Drupal\image_test\Plugin\ImageToolkit\Operation\test
View source
class Failing extends OperationBase {
    
    /**
     * {@inheritdoc}
     */
    public function execute(array $arguments) {
        throw new \RuntimeException('Ahem, this image operation failed');
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
Failing::execute public function Performs the actual manipulation on the image. Overrides OperationBase::execute
ImageToolkitOperationBase::$logger protected property A logger instance.
ImageToolkitOperationBase::$toolkit protected property The image toolkit.
ImageToolkitOperationBase::apply final public function Applies a toolkit specific operation to an image. Overrides ImageToolkitOperationInterface::apply
ImageToolkitOperationBase::getToolkit protected function Returns the image toolkit instance for this operation. 1
ImageToolkitOperationBase::prepareArguments protected function Checks for required arguments and adds optional argument defaults.
ImageToolkitOperationBase::validateArguments protected function Validates the arguments. 6
ImageToolkitOperationBase::__construct public function Constructs an image toolkit operation plugin.
OperationBase::arguments public function Returns the definition of the operation arguments. Overrides ImageToolkitOperationBase::arguments
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 6
PluginInspectionInterface::getPluginId public function Gets the plugin ID of the plugin instance. 2

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