Neos\Fusion\Tests\Functional\View\FusionViewTest::buildView PHP Method

buildView() protected method

Prepare a TypoScriptView for testing that Mocks a request with the given controller and action names.
protected buildView ( string $controllerObjectName, string $controllerActionName ) : FusionView
$controllerObjectName string
$controllerActionName string
return Neos\Fusion\View\FusionView
    protected function buildView($controllerObjectName, $controllerActionName)
    {
        $request = $this->getMockBuilder(ActionRequest::class)->disableOriginalConstructor()->getMock();
        $request->expects($this->any())->method('getControllerObjectName')->will($this->returnValue($controllerObjectName));
        $request->expects($this->any())->method('getControllerActionName')->will($this->returnValue($controllerActionName));
        $this->mockControllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($request));
        $view = new FusionView();
        $view->setControllerContext($this->mockControllerContext);
        $this->inject($view, 'fallbackView', $this->mockFallbackView);
        $view->setTypoScriptPathPattern(__DIR__ . '/Fixtures/TypoScript');
        return $view;
    }