Esempio n. 1
0
 protected function setUp()
 {
     parent::setUp();
     $this->links = Navigation::links(array(array('foo', '#'), array('bar', '#')));
 }
Esempio n. 2
0
 /**
  * @dataProvider classes
  */
 public function testStylesAll($class)
 {
     $links = Navigation::links(array(array('foo', '#'), array('bar', '#')));
     $menu = Navigation::$class($links, true, array('class' => 'bar', 'data-foo' => 'bar'));
     $match = $this->createNavMatcher($class, 'bar', true);
     $match['attributes']['data-foo'] = 'bar';
     $this->assertHTML($match, $menu);
 }
Esempio n. 3
0
 public function testActiveTab()
 {
     $arr = $this->createLinks();
     //Set second tab as active
     $arr[1][2] = true;
     $tabs = Tabbable::tabs(Navigation::links($arr));
     //Set matcher with
     $matcher = $this->createMatcher('above', 'tabs', 'Section 2', "Howdy, I'm in Section 2.");
     $this->assertHTML($matcher, $tabs);
 }
Esempio n. 4
0
 public function testClosureNotVisibleMenu()
 {
     $visible = function ($item) {
         return $item['label'] === 'bar';
     };
     $navbar = Navbar::create()->with_menus(Navigation::links(array(array('foo', '#'), array('bar', '#', false, false, null, null, $visible), array('baz', '#', false, false, null, null, $visible))));
     $matcher = $this->getBasicMatcher();
     $matcher['child']['child']['child'] = array('tag' => 'ul', 'attributes' => array('class' => 'nav'), 'children' => array('count' => 2, 'only' => array('tag' => 'li')));
     $this->assertHTML($matcher, $navbar);
 }