compress() public method

Apply the compression
public compress ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface The event instance
Example #1
0
 public function testDoesNotApplyCompressionToGifImages()
 {
     $image = $this->getMock('Imbo\\Model\\Image');
     $image->expects($this->once())->method('getMimeType')->will($this->returnValue('image/gif'));
     $event = $this->getMock('Imbo\\EventManager\\Event');
     $event->expects($this->at(0))->method('getArgument')->with('params')->will($this->returnValue(['level' => 40]));
     $event->expects($this->at(1))->method('getArgument')->with('image')->will($this->returnValue($image));
     $imagick = $this->getMock('Imagick');
     $imagick->expects($this->never())->method('setImageCompressionQuality');
     $this->transformation->setImagick($imagick)->transform($event);
     $this->transformation->compress($event);
 }