public function testBadgeRender()
 {
     $html = Menu::widget(['options' => ['class' => 'menu-class'], 'items' => [['icon' => 'glyphicon glyphicon-home', 'label' => 'Dashboard', 'url' => ['/admin/'], 'active' => true, 'badge' => '35', 'badgeOptions' => ['class' => 'bg-blue']]]]);
     $crawler = new Crawler($html);
     $badge = $crawler->filter('ul.menu-class > li.active > a small.label');
     $this->assertEquals('bg-blue label pull-right', $badge->attr('class'));
     $this->assertEquals('35', $badge->text());
 }
Beispiel #2
0
<aside class="main-sidebar">

    <section class="sidebar">
        <!-- sidebar menu: : style can be found in sidebar.less -->
        <?php 
echo \webtoolsnz\AdminLte\widgets\Menu::widget(['options' => ['class' => 'sidebar-menu'], 'items' => $this->theme->mainMenuItems]);
?>
    </section>
    <!-- /.sidebar -->
</aside>