/** @test */ public function it_sets_icon() { $menu = new MenuItem(); $menu->icon('menu-icon'); $this->assertEquals('menu-icon', $menu->getIcon()); }
protected function renderSingleItem() { $content = $this->htmlBuilder->tag('i', ['class' => ['fa', 'fa-fw', $this->menuItem->getIcon()]]); $content .= ' ' . $this->menuItem->getLabel(); return $this->htmlBuilder->tag('a', ['href' => $this->menuItem->getUrl()], $content); }