Exemplo n.º 1
0
 /**
  * Set the default controller and action names if none has been specified.
  *
  * @return void
  */
 protected function setDefaultControllerAndActionNameIfNoneSpecified()
 {
     if ($this->actionRequest->getControllerName() === NULL) {
         $this->actionRequest->setControllerName('Standard');
     }
     if ($this->actionRequest->getControllerActionName() === NULL) {
         $this->actionRequest->setControllerActionName('index');
     }
 }
 /**
  * @test
  * @param mixed $invalidControllerName
  * @dataProvider invalidControllerNames
  * @expectedException \TYPO3\Flow\Mvc\Exception\InvalidControllerNameException
  */
 public function setControllerNameThrowsExceptionOnInvalidControllerNames($invalidControllerName)
 {
     $this->actionRequest->setControllerName($invalidControllerName);
 }
 /**
  * Set the default controller and action names if none has been specified.
  *
  * @param ActionRequest $actionRequest
  * @return void
  */
 protected function setDefaultControllerAndActionNameIfNoneSpecified(ActionRequest $actionRequest)
 {
     if ($actionRequest->getControllerName() === null) {
         $actionRequest->setControllerName('Standard');
     }
     if ($actionRequest->getControllerActionName() === null) {
         $actionRequest->setControllerActionName('index');
     }
 }
Exemplo n.º 4
0
 /**
  * @test
  * @dataProvider invalidControllerNames
  * @expectedException TYPO3\Flow\Mvc\Exception\InvalidControllerNameException
  */
 public function setControllerNameThrowsExceptionOnInvalidControllerNames($invalidControllerName)
 {
     $httpRequest = HttpRequest::create(new Uri('http://robertlemke.com/blog'));
     $actionRequest = new ActionRequest($httpRequest);
     $actionRequest->setControllerName($invalidControllerName);
 }