public function setUp()
{
$this->request = $this->getMock('Imbo\\Http\\Request\\Request');
$this->response = $this->getMock('Imbo\\Http\\Response\\Response');
$this->database = $this->getMock('Imbo\\Database\\DatabaseInterface');
$this->accessControl = $this->getMock('Imbo\\Auth\\AccessControl\\Adapter\\AdapterInterface');
$this->image = $this->getMock('Imbo\\Model\\Image');
$this->request->expects($this->any())->method('getUser')->will($this->returnValue($this->user));
$this->request->expects($this->any())->method('getUsers')->will($this->returnValue([$this->user]));
$this->request->expects($this->any())->method('getImageIdentifier')->will($this->returnValue($this->imageIdentifier));
$this->event = $this->getMock('Imbo\\EventManager\\Event');
$this->event->expects($this->any())->method('getResponse')->will($this->returnValue($this->response));
$this->event->expects($this->any())->method('getRequest')->will($this->returnValue($this->request));
$this->event->expects($this->any())->method('getDatabase')->will($this->returnValue($this->database));
$this->event->expects($this->any())->method('getAccessControl')->will($this->returnValue($this->accessControl));
$this->listener = new DatabaseOperations();
}