public function throwsParserExceptionIfTemplateSourceContainsErrors()
{
// @TODO: use vfs
$validTemplatePathAndFilename = $this->getAbsoluteFixtureTemplatePathAndFilename(self::FIXTURE_TEMPLATE_ABSOLUTELYMINIMAL);
$validTemplateSource = file_get_contents($validTemplatePathAndFilename);
$invalidTemplateSource = $validTemplateSource . LF . LF . '</f:section>' . LF;
$temporaryFilePathAndFilename = GeneralUtility::getFileAbsFileName('typo3temp/flux-temp-' . uniqid() . '.html');
GeneralUtility::writeFile($temporaryFilePathAndFilename, $invalidTemplateSource);
$view = $this->getPreparedViewWithTemplateFile($temporaryFilePathAndFilename);
$this->setExpectedException('Tx_Fluid_Core_Parser_Exception');
$this->callInaccessibleMethod($view, 'getStoredVariable', 'FluidTYPO3\\Flux\\ViewHelpers\\FormViewHelper', 'storage');
}