protected function getEventMock($class) { if (!isset($this->eventMock)) { $this->eventMock = $this->getMockBuilder($class)->disableOriginalConstructor()->getMock(); $this->eventMock->expects($this->any())->method('getRequest')->will($this->returnValue($this->getRequestMock())); } return $this->eventMock; }
/** * @return PHPUnit_Framework_MockObject_MockObject|GetResponseEvent */ 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; }