Test the image_crop() function.
function testCrop() {
$this
->assertTrue(image_crop($this->image, 1, 2, 3, 4), 'Function returned the expected value.');
$this
->assertToolkitOperationsCalled(array(
'crop',
));
// Check the parameters.
$calls = $this
->imageTestGetAllCalls();
$this
->assertEqual($calls['crop'][0][1], 1, 'X was passed correctly');
$this
->assertEqual($calls['crop'][0][2], 2, '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');
}