function ToolkitTest::testApplyNoParameters

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

Tests the 'apply' method without parameters.

File

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

Class

ToolkitTest
Tests the image toolkit.

Namespace

Drupal\KernelTests\Core\Image

Code

public function testApplyNoParameters() : void {
  // The operation plugin itself does not exist, so apply will return false.
  $this->assertFalse($this->image
    ->apply('my_operation'));
  // Check that apply was called and with the correct parameters.
  $this->assertToolkitOperationsCalled([
    'apply',
  ]);
  $calls = $this->imageTestGetAllCalls();
  $this->assertEquals('my_operation', $calls['apply'][0][0]);
  $this->assertSame([], $calls['apply'][0][1]);
}

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