public function setUp()
 {
     $this->tsfeBackup = $GLOBALS['TSFE'];
     $GLOBALS['TSFE'] = $this->getMock('tslib_fe', array(), array(), '', FALSE);
     $this->getBackup = t3lib_div::_GET();
     $this->contentObject = $this->getMock('tslib_cObj');
     $this->request = $this->getMock('Tx_Extbase_MVC_Web_Request');
     $this->uriBuilder = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Web_Routing_UriBuilder'), array('dummy'), array($this->contentObject));
     $this->uriBuilder->setRequest($this->request);
 }
Exemplo n.º 2
0
 public function setUp()
 {
     $this->tsfeBackup = $GLOBALS['TSFE'];
     $GLOBALS['TSFE'] = $this->getMock('tslib_fe', array(), array(), '', FALSE);
     $this->getBackup = t3lib_div::_GET();
     $this->mockContentObject = $this->getMock('tslib_cObj');
     $this->mockRequest = $this->getMock('Tx_Extbase_MVC_Web_Request');
     $this->uriBuilder = $this->getAccessibleMock('Tx_Extbase_MVC_Web_Routing_UriBuilder', array('build'));
     $this->uriBuilder->setRequest($this->mockRequest);
     $this->uriBuilder->_set('contentObject', $this->mockContentObject);
 }
 /**
  * Processes a general request. The result can be returned by altering the given response.
  *
  * @param Tx_Extbase_MVC_Request $request The request object
  * @param Tx_Extbase_MVC_Response $response The response, modified by this handler
  * @return void
  * @throws Tx_Extbase_MVC_Exception_UnsupportedRequestType if the controller doesn't support the current request type
  * @api
  */
 public function processRequest(Tx_Extbase_MVC_Request $request, Tx_Extbase_MVC_Response $response)
 {
     if (!$this->canProcessRequest($request)) {
         throw new Tx_Extbase_MVC_Exception_UnsupportedRequestType(get_class($this) . ' does not support requests of type "' . get_class($request) . '". Supported types are: ' . implode(' ', $this->supportedRequestTypes), 1187701131);
     }
     $this->request = $request;
     $this->request->setDispatched(TRUE);
     $this->response = $response;
     $this->uriBuilder = t3lib_div::makeInstance('Tx_Extbase_MVC_Web_Routing_UriBuilder');
     $this->uriBuilder->setRequest($request);
     $this->initializeControllerArgumentsBaseValidators();
     $this->mapRequestArgumentsToControllerArguments();
 }