/** * Sets up the view */ public function __construct() { $this->view = GeneralUtility::makeInstance(TemplateView::class); $context = new RenderingContext($this->view); $context->setControllerName('ErrorPage'); $context->setTemplatePaths(new TemplatePaths(['templateRootPaths' => [ExtensionManagementUtility::extPath('core', 'Resources/Private/Templates/ErrorPage/')]])); $this->view->setRenderingContext($context); }
/** * @return void */ public function setUp() { parent::setUp(); $this->subject = $this->getMock(RenderViewHelper::class, array('renderChildren')); $this->view = $this->getMock(TemplateView::class, array('renderPartial', 'renderSection')); $this->view->setRenderingContext($this->renderingContext); $container = new ViewHelperVariableContainer(); $container->setView($this->view); $this->renderingContext->setViewHelperVariableContainer($container); $this->subject->setRenderingContext($this->renderingContext); }
public function __construct(\TYPO3Fluid\Fluid\View\TemplateView $fluid, FileLocatorInterface $locator, ContainerInterface $container) { $this->fluid = $fluid; $this->locator = $locator; $this->container = $container; $fluid->setRenderingContext($container->get('fluid.renderingContext')); $this->fluid->getRenderingContext()->setTemplatePaths(new SymfonyTemplatePaths()); $this->fluid->getRenderingContext()->setContainer($container); }