Exemplo n.º 1
0
 public function setUp()
 {
     $widgetEntity = new WidgetModel();
     $widgetEntity->setId(1);
     $widgetEntity->setParameters(['html_body' => 'simple html body']);
     $this->widget = new HtmlWidgetHandler($widgetEntity);
 }
Exemplo n.º 2
0
 public function testMenuWidgetWhenCustomTemplateIsNotSet()
 {
     $widgetModel = new WidgetModel();
     $widgetModel->setParameters(['menu_name' => 'test', 'template_name' => null]);
     $widgetHandler = new MenuWidgetHandler($widgetModel, $this->getContainer()->get('templating'));
     $content = $widgetHandler->render();
     $this->assertContains('Default menu template', $content);
     $this->assertContainsRenderedWidget($content);
 }