Test the image_crop_effect() function.
function testCropEffect() {
// @todo should test the keyword offsets.
$this
->assertTrue(image_crop_effect($this->image, array(
'anchor' => 'top-1',
'width' => 3,
'height' => 4,
)), '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, 'X was passed correctly');
$this
->assertEqual($calls['crop'][0][2], 1, 'Y was passed correctly');
$this
->assertEqual($calls['crop'][0][3], 3, 'Width was passed correctly');
$this
->assertEqual($calls['crop'][0][4], 4, 'Height was passed correctly');
}