loadUser() public method

Load user data
public loadUser ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface An event instance
Beispiel #1
0
 /**
  * @covers Imbo\EventListener\DatabaseOperations::loadUser
  */
 public function testCanLoadUser()
 {
     $date = new DateTime();
     $this->database->expects($this->once())->method('getNumImages')->with($this->user)->will($this->returnValue(123));
     $this->database->expects($this->once())->method('getLastModified')->with([$this->user])->will($this->returnValue($date));
     $this->response->expects($this->once())->method('setModel')->with($this->isInstanceOf('Imbo\\Model\\User'))->will($this->returnSelf());
     $this->response->expects($this->once())->method('setLastModified')->with($date);
     $this->listener->loadUser($this->event);
 }