protected function getEventMock($class = null) { if (!isset($this->eventMock)) { parent::getEventMock('Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent'); $this->eventMock->expects($this->any())->method('getRequestType')->will($this->returnValue($this->requestType)); } return $this->eventMock; }