getRequestMock() protected method

protected getRequestMock ( ) : PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject | Request
return PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject | Symfony\Component\HttpFoundation\Request
 /**
  * @return PHPUnit_Framework_MockObject_MockObject|Request
  */
 protected function getRequestMock()
 {
     if (!isset($this->requestMock)) {
         $this->requestMock = parent::getRequestMock();
         if ($this->sessionMock === false) {
             $this->requestMock->expects($this->never())->method('getSession');
         } else {
             $this->requestMock->expects($this->atLeastOnce())->method('getSession')->will($this->returnValue($this->getSessionMock()));
         }
         if ($this->route === false) {
             $this->requestMock->expects($this->never())->method('get');
         } else {
             $this->requestMock->expects($this->atLeastOnce())->method('get')->with('_route')->will($this->returnValue($this->route));
         }
     }
     return $this->requestMock;
 }