Neos\Flow\Mvc\Exception\ForwardException::setNextRequest PHP Метод

setNextRequest() публичный Метод

Sets the next request, containing the information about the next action to execute.
public setNextRequest ( ActionRequest $nextRequest ) : void
$nextRequest Neos\Flow\Mvc\ActionRequest
Результат void
    public function setNextRequest(ActionRequest $nextRequest)
    {
        $this->nextRequest = $nextRequest;
    }

Usage Example

 /**
  * @test
  */
 public function dispatchContinuesWithNextRequestFoundInAForwardException()
 {
     /** @var ActionRequest|\PHPUnit_Framework_MockObject_MockObject $nextRequest */
     $nextRequest = $this->getMockBuilder(ActionRequest::class)->disableOriginalConstructor()->getMock();
     $nextRequest->expects($this->atLeastOnce())->method('isDispatched')->will($this->returnValue(true));
     $this->mockParentRequest->expects($this->atLeastOnce())->method('isDispatched')->will($this->returnValue(false));
     $this->mockController->expects($this->at(0))->method('processRequest')->with($this->mockActionRequest)->will($this->throwException(new StopActionException()));
     $forwardException = new ForwardException();
     $forwardException->setNextRequest($nextRequest);
     $this->mockController->expects($this->at(1))->method('processRequest')->with($this->mockParentRequest)->will($this->throwException($forwardException));
     $this->dispatcher->dispatch($this->mockActionRequest, $this->mockHttpResponse);
 }
All Usage Examples Of Neos\Flow\Mvc\Exception\ForwardException::setNextRequest