function ImageEffectsUnitTest::testDesaturateEffect

Test the image_desaturate_effect() function.

File

modules/image/image.test, line 473

Class

ImageEffectsUnitTest
Use the image_test.module's mock toolkit to ensure that the effects are properly passing parameters to the image toolkit.

Code

function testDesaturateEffect() {
    $this->assertTrue(image_desaturate_effect($this->image, array()), 'Function returned the expected value.');
    $this->assertToolkitOperationsCalled(array(
        'desaturate',
    ));
    // Check the parameters.
    $calls = image_test_get_all_calls();
    $this->assertEqual(count($calls['desaturate'][0]), 1, 'Only the image was passed.');
}

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