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. 10 core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php \Drupal\KernelTests\Core\Image\ToolkitTest::testApplyNoParameters()
  3. 11.x core/tests/Drupal/KernelTests/Core/Image/ToolkitTest.php \Drupal\KernelTests\Core\Image\ToolkitTest::testApplyNoParameters()

Test the image_apply() function.

File

core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php, line 67

Class

ToolkitTest
Tests image toolkit functions.

Namespace

Drupal\FunctionalTests\Image

Code

public function testApplyNoParameters() {
    $this->assertTrue($this->image
        ->apply('my_operation'), 'Function returned the expected value.');
    // Check that apply was called and with the correct parameters.
    $this->assertToolkitOperationsCalled([
        'apply',
    ]);
    $calls = $this->imageTestGetAllCalls();
    $this->assertEqual($calls['apply'][0][0], 'my_operation', "'my_operation' was passed correctly as operation");
    $this->assertEqual($calls['apply'][0][1], [], 'passing no parameters was handled correctly');
}

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