You are here

public function ToolkitTest::testApplyNoParameters in Drupal 9

Tests the 'apply' method without parameters.

File

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

Class

ToolkitTest
Tests the image toolkit.

Namespace

Drupal\KernelTests\Core\Image

Code

public function testApplyNoParameters() {
  $this
    ->assertTrue($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]);
}