loadMetadata() public method

Load metadata
public loadMetadata ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface An event instance
Beispiel #1
0
 /**
  * @covers Imbo\EventListener\DatabaseOperations::loadMetadata
  */
 public function testCanLoadMetadata()
 {
     $date = new DateTime();
     $this->database->expects($this->once())->method('getMetadata')->with($this->user, $this->imageIdentifier)->will($this->returnValue(['key' => 'value']));
     $this->database->expects($this->once())->method('getLastModified')->with([$this->user], $this->imageIdentifier)->will($this->returnValue($date));
     $this->response->expects($this->once())->method('setModel')->with($this->isInstanceOf('Imbo\\Model\\Metadata'))->will($this->returnSelf());
     $this->response->expects($this->once())->method('setLastModified')->with($date);
     $this->listener->loadMetadata($this->event);
 }