public function testTransformWithDifferentParameters($scale, $resultingWidth = 256)
{
$blob = file_get_contents(FIXTURES_DIR . '/512x512.png');
$image = $this->getMock('Imbo\\Model\\Image');
$image->expects($this->any())->method('getBlob')->will($this->returnValue($blob));
$image->expects($this->any())->method('getWidth')->will($this->returnValue(512));
$image->expects($this->any())->method('getHeight')->will($this->returnValue(512));
$image->expects($this->any())->method('getExtension')->will($this->returnValue('png'));
$image->expects($this->once())->method('setWidth')->with($resultingWidth)->will($this->returnValue($image));
$image->expects($this->once())->method('setHeight')->will($this->returnValue($image));
$image->expects($this->once())->method('hasBeenTransformed')->with(true);
$event = $this->getMock('Imbo\\EventManager\\Event');
$event->expects($this->at(0))->method('getArgument')->with('image')->will($this->returnValue($image));
$event->expects($this->at(1))->method('getArgument')->with('params')->will($this->returnValue(['scale' => $scale]));
$imagick = new Imagick();
$imagick->readImageBlob($blob);
$this->getTransformation()->setImagick($imagick)->transform($event);
}