function ImageEffectsTest::testDesaturateEffect

Test the image_desaturate_effect() function.

File

core/modules/image/tests/src/Functional/ImageEffectsTest.php, line 147

Class

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

Namespace

Drupal\Tests\image\Functional

Code

public function testDesaturateEffect() {
  $this->assertImageEffect('image_desaturate', []);
  $this->assertToolkitOperationsCalled([
    'desaturate',
  ]);
  // Check the parameters.
  $calls = $this->imageTestGetAllCalls();
  $this->assertCount(0, $calls['desaturate'][0], 'No parameters were passed.');
}

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