You are here

function ToolkitTest::testApplyNoParameters in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Image/ToolkitTest.php \Drupal\system\Tests\Image\ToolkitTest::testApplyNoParameters()

Test the image_apply() function.

File

core/modules/system/src/Tests/Image/ToolkitTest.php, line 65
Contains \Drupal\system\Tests\Image\ToolkitTest.

Class

ToolkitTest
Tests image toolkit functions.

Namespace

Drupal\system\Tests\Image

Code

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(array(
    '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], array(), 'passing no parameters was handled correctly');
}