/**
  * @test
  */
 public function testGetCurrentConfigurationNameReturnsRequestParameterIfActionIsSave()
 {
     $request = new Request();
     $request->setControllerActionName('save');
     $request->setArguments(array('configurationName' => 'foobar'));
     $instance = $this->getMockForAbstractClass('FluidTYPO3\\Fluidbackend\\Controller\\AbstractBackendController');
     $this->inject($instance, 'request', $request);
     $result = $this->callInaccessibleMethod($instance, 'getCurrentConfigurationName');
     $this->assertEquals('foobar', $result);
 }
Exemplo n.º 2
0
 /**
  * Forwards the request to another action and / or controller.
  *
  * Request is directly transfered to the other action / controller
  * without the need for a new request.
  *
  * @param string $actionName Name of the action to forward to
  * @param string $controllerName Unqualified object name of the controller to forward to. If not specified, the current controller is used.
  * @param string $extensionName Name of the extension containing the controller to forward to. If not specified, the current extension is assumed.
  * @param array $arguments Arguments to pass to the target action
  * @return void
  * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
  * @see redirect()
  * @api
  */
 public function forward($actionName, $controllerName = NULL, $extensionName = NULL, array $arguments = NULL)
 {
     $this->request->setDispatched(FALSE);
     $this->request->setControllerActionName($actionName);
     if ($controllerName !== NULL) {
         $this->request->setControllerName($controllerName);
     }
     if ($extensionName !== NULL) {
         $this->request->setControllerExtensionName($extensionName);
     }
     if ($arguments !== NULL) {
         $this->request->setArguments($arguments);
     }
     throw new \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException();
 }