Neos\Neos\Tests\Functional\Fusion\RenderingTest::simulateRendering PHP Метод

simulateRendering() защищенный Метод

Simulate the rendering
protected simulateRendering ( string $additionalTypoScriptFile = null, boolean $debugMode = false ) : string
$additionalTypoScriptFile string
$debugMode boolean
Результат string
    protected function simulateRendering($additionalTypoScriptFile = null, $debugMode = false)
    {
        $typoScriptRuntime = $this->createRuntimeWithFixtures($additionalTypoScriptFile);
        $typoScriptRuntime->setEnableContentCache(false);
        if ($debugMode) {
            $typoScriptRuntime->injectSettings(array('debugMode' => true, 'rendering' => array('exceptionHandler' => \Neos\Fusion\Core\ExceptionHandlers\ThrowingHandler::class)));
        }
        $contentContext = $this->node->getContext();
        if (!$contentContext instanceof ContentContext) {
            $this->fail('Node context must be of type ContentContext');
        }
        $typoScriptRuntime->pushContextArray(array('node' => $this->node, 'documentNode' => $this->node, 'site' => $contentContext->getCurrentSiteNode(), 'fixturesDirectory' => __DIR__ . '/Fixtures'));
        $output = $typoScriptRuntime->render('page1');
        $typoScriptRuntime->popContext();
        return $output;
    }