Carew\Tests\Event\Listener\Decorator\TwigTest::testPreRenderThrowExceptionOnTemplateFromString PHP Method

testPreRenderThrowExceptionOnTemplateFromString() public method

    public function testPreRenderThrowExceptionOnTemplateFromString()
    {
        $document = new Document();
        $document->setLayout('default');
        $document->setBody(<<<EOL
Hello

{{ foobar }
EOL
);
        $event = new CarewEvent(array($document));
        $this->twigListenner->preRender($event);
        $this->assertSame('foobar', $document->getBody());
    }