Author: Kristoffer Brabrand (kristoffer@brabrand.no)
Inheritance: implements Imbo\EventListener\ListenerInterface
Beispiel #1
0
 /**
  * @covers Imbo\EventListener\AutoRotateImage::autoRotate
  */
 public function testTriggersAnEventForRotatingTheImage()
 {
     $image = $this->getMock('Imbo\\Model\\Image');
     $request = $this->getMock('Imbo\\Http\\Request\\Request');
     $request->expects($this->once())->method('getImage')->will($this->returnValue($image));
     $eventManager = $this->getMock('Imbo\\EventManager\\EventManager');
     $eventManager->expects($this->once())->method('trigger')->with('image.transformation.autorotate', array('image' => $image));
     $event = $this->getMock('Imbo\\EventManager\\Event');
     $event->expects($this->once())->method('getRequest')->will($this->returnValue($request));
     $event->expects($this->once())->method('getManager')->will($this->returnValue($eventManager));
     $this->listener->autoRotate($event);
 }