public function testTwig() { $app = $this->getApp(); $handler = new HtmlHandler($app); $result = $handler->twig("{{ 'koala'|capitalize }}"); $this->assertSame('Koala', $result); }
public function testWidget() { $app = $this->getApp(); $handler = new HtmlHandler($app); $widget = (new Widget())->setType('frontend')->setLocation('gum-tree')->setContent('<blink>Drop Bear Warning!</blink>'); $app['asset.queue.widget']->add($widget); $result = $handler->widget('frontend', 'gum-tree'); $this->assertRegExp('#<div class="widgetholder widgetholder-gum-tree">#', $result); $this->assertRegExp('#<blink>Drop Bear Warning!</blink>#', $result); }