Test the image_scale() function.
function testScale() {
// TODO: need to test upscaling
$this
->assertTrue(image_scale($this->image, 10, 10), 'Function returned the expected value.');
$this
->assertToolkitOperationsCalled(array(
'resize',
));
// Check the parameters.
$calls = $this
->imageTestGetAllCalls();
$this
->assertEqual($calls['resize'][0][1], 10, 'Width was passed correctly');
$this
->assertEqual($calls['resize'][0][2], 5, 'Height was based off aspect ratio and passed correctly');
}