You are here

function ImageEffectsTest::testDesaturateEffect in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/image/src/Tests/ImageEffectsTest.php \Drupal\image\Tests\ImageEffectsTest::testDesaturateEffect()

Test the image_desaturate_effect() function.

File

core/modules/image/src/Tests/ImageEffectsTest.php, line 125
Contains \Drupal\image\Tests\ImageEffectsTest.

Class

ImageEffectsTest
Tests that the image effects pass parameters to the toolkit correctly.

Namespace

Drupal\image\Tests

Code

function testDesaturateEffect() {
  $this
    ->assertImageEffect('image_desaturate', array());
  $this
    ->assertToolkitOperationsCalled(array(
    'desaturate',
  ));

  // Check the parameters.
  $calls = $this
    ->imageTestGetAllCalls();
  $this
    ->assertEqual(count($calls['desaturate'][0]), 0, 'No parameters were passed.');
}