| 7 image.test | ImageEffectsUnitTest::testCropEffect() |
| 8 image.test | ImageEffectsUnitTest::testCropEffect() |
Test the image_crop_effect() function.
File
- modules/
image/ image.test, line 280 - Tests for image.module.
Code
function testCropEffect() {
// @todo should test the keyword offsets.
$this->assertTrue(image_crop_effect($this->image, array('anchor' => 'top-1', 'width' => 3, 'height' => 4)), t('Function returned the expected value.'));
$this->assertToolkitOperationsCalled(array('crop'));
// Check the parameters.
$calls = image_test_get_all_calls();
$this->assertEqual($calls['crop'][0][1], 0, t('X was passed correctly'));
$this->assertEqual($calls['crop'][0][2], 1, t('Y was passed correctly'));
$this->assertEqual($calls['crop'][0][3], 3, t('Width was passed correctly'));
$this->assertEqual($calls['crop'][0][4], 4, t('Height was passed correctly'));
}
Login or register to post comments