public function setUp()
{
$requestHeaders = $this->getMock('Symfony\\Component\\HttpFoundation\\HeaderBag');
$requestHeaders->expects($this->any())->method('get')->with('Origin')->will($this->returnValue('http://imbo-project.org'));
$this->request = $this->getMock('Imbo\\Http\\Request\\Request');
$this->request->headers = $requestHeaders;
$this->response = $this->getMock('Imbo\\Http\\Response\\Response');
$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->listener = new Cors();
}