Bolt\Tests\Twig\WidgetHandlerTest::testWidget PHP Method

testWidget() public method

public testWidget ( )
    public function testWidget()
    {
        $app = $this->getApp();
        $handler = new WidgetHandler($app);
        $widget = (new Widget())->setZone('frontend')->setLocation('gum-tree')->setContent('<blink>Drop Bear Warning!</blink>');
        $app['asset.queue.widget']->add($widget);
        $result = $handler->widgets('gum-tree', 'frontend');
        $this->assertRegExp('#<div class="widgetholder widgetholder-gum-tree">#', (string) $result);
        $this->assertRegExp('#<blink>Drop Bear Warning!</blink>#', (string) $result);
    }