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

testPreRenderWithGlobalVars() public method

    public function testPreRenderWithGlobalVars()
    {
        $document = new Document();
        $document->setLayout('default');
        $document->setBody('{{ carew.extra.foo }}');
        $event = new CarewEvent(array($document));
        $this->getTwigGlobals()->fromArray(array('foo' => 'bar'));
        $this->twigListenner->preRender($event);
        $this->assertSame('bar', $document->getBody());
    }