function ImageToolkitUnitTest::testRotate

Test the image_rotate() function.

File

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

Class

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

Code

function testRotate() {
    $this->assertTrue(image_rotate($this->image, 90, 1), 'Function returned the expected value.');
    $this->assertToolkitOperationsCalled(array(
        'rotate',
    ));
    // Check the parameters.
    $calls = image_test_get_all_calls();
    $this->assertEqual($calls['rotate'][0][1], 90, 'Degrees were passed correctly');
    $this->assertEqual($calls['rotate'][0][2], 1, 'Background color was passed correctly');
}

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