function ImageEffectsTest::testDesaturateEffect

Same name in other branches
  1. 9 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testDesaturateEffect()
  2. 10 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testDesaturateEffect()
  3. 11.x core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\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.