This transformation can be used to convert the image from one type to another.
Author: Christer Edvartsen (cogo@starzinger.net)
Inheritance: extends Transformation, implements Imbo\EventListener\ListenerInterface
Beispiel #1
0
 /**
  * @covers Imbo\Image\Transformation\Convert::transform
  */
 public function testWillNotConvertImageIfNotNeeded()
 {
     $image = $this->getMock('Imbo\\Model\\Image');
     $image->expects($this->once())->method('getExtension')->will($this->returnValue('png'));
     $image->expects($this->never())->method('getBlob');
     $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(array('type' => 'png')));
     $this->transformation->transform($event);
 }