Neos\Flow\Tests\Unit\Mvc\Controller\AbstractControllerTest::redirectRedirectsToTheSpecifiedAction PHP Method

redirectRedirectsToTheSpecifiedAction() public method

    public function redirectRedirectsToTheSpecifiedAction()
    {
        $arguments = ['foo' => 'bar'];
        $mockUriBuilder = $this->createMock(UriBuilder::class);
        $mockUriBuilder->expects($this->once())->method('reset')->will($this->returnValue($mockUriBuilder));
        $mockUriBuilder->expects($this->once())->method('setFormat')->with('doc')->will($this->returnValue($mockUriBuilder));
        $mockUriBuilder->expects($this->once())->method('setCreateAbsoluteUri')->will($this->returnValue($mockUriBuilder));
        $mockUriBuilder->expects($this->once())->method('uriFor')->with('show', $arguments, 'Stuff', 'Super', 'Duper\\Package')->will($this->returnValue('the uri'));
        $controller = $this->getAccessibleMock(AbstractController::class, ['processRequest', 'redirectToUri']);
        $this->inject($controller, 'flashMessageContainer', new FlashMessageContainer());
        $controller->_call('initializeController', $this->mockActionRequest, $this->mockHttpResponse);
        $this->inject($controller, 'uriBuilder', $mockUriBuilder);
        $controller->expects($this->once())->method('redirectToUri')->with('the uri');
        $controller->_call('redirect', 'show', 'Stuff', 'Super\\Duper\\Package', $arguments, 0, 303, 'doc');
    }