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;
}