ImboUnitTest\EventListener\DatabaseOperationsTest::testCanLoadUser PHP Method

testCanLoadUser() public method

public testCanLoadUser ( )
    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);
    }