| 7 image.test | ImageEffectsUnitTest::testRotateEffect() |
| 8 image.test | ImageEffectsUnitTest::testRotateEffect() |
Test the image_rotate_effect() function.
File
- modules/
image/ image.test, line 323 - Tests for image.module.
Code
function testRotateEffect() {
// @todo: need to test with 'random' => TRUE
$this->assertTrue(image_rotate_effect($this->image, array('degrees' => 90, 'bgcolor' => '#fff')), t('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, t('Degrees were passed correctly'));
$this->assertEqual($calls['rotate'][0][2], 0xffffff, t('Background color was passed correctly'));
}
Login or register to post comments