function ImageToolkitUnitTest::testDesaturate

Test the image_desaturate() function.

File

modules/simpletest/tests/image.test, line 190

Class

ImageToolkitUnitTest
Test that the functions in image.inc correctly pass data to the toolkit.

Code

function testDesaturate() {
    $this->assertTrue(image_desaturate($this->image), '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.