Bolt\Tests\Twig\WidgetHandlerTest::testCountWidgetsNoLocationStrict PHP Метод

testCountWidgetsNoLocationStrict() публичный Метод

    public function testCountWidgetsNoLocationStrict()
    {
        $app = $this->getStrictVariablesApp(true);
        $handler = new WidgetHandler($app);
        $widget = (new Widget())->setZone('frontend')->setLocation('gum-tree')->setContent('<blink>Drop Bear Warning!</blink>');
        $this->setExpectedException('InvalidArgumentException', 'countwidgets() requires a location, none given');
        $app['asset.queue.widget']->add($widget);
        $handler->countWidgets();
    }