public function testSubMenu()
 {
     $matcher = array('tag' => 'ul', 'attributes' => array('class' => 'nav nav-tabs'), 'child' => array('tag' => 'li', 'attributes' => array('class' => 'dropdown active'), 'descendant' => array('tag' => 'a', 'attributes' => array('class' => 'dropdown-toggle', 'data-toggle' => 'dropdown'), 'content' => 'Dropdown', 'child' => array('tag' => 'b', 'attributes' => array('class' => 'caret'))), 'child' => array('tag' => 'ul', 'attributes' => array('class' => 'dropdown-menu'), 'child' => array('tag' => 'li', 'attributes' => array('class' => 'dropdown-submenu'), 'descendant' => array('tag' => 'a', 'content' => 'Action'), 'child' => array('tag' => 'ul', 'attributes' => array('class' => 'dropdown-menu'), 'child' => array('tag' => 'li', 'child' => array('tag' => 'a', 'content' => 'Sub Action')))))));
     $links = Navigation::links(array(array('Dropdown', '#', true, false, array(array('Action', '#', false, false, array(array('Sub Action', '#')))))));
     $tabs = Navigation::tabs($links);
     $this->assertTag($matcher, $tabs);
 }
Esempio n. 2
0
 /**
  * Creates a navigation tab object.
  *
  * @param array $links The links to be passed in
  * @param array $attributes The attributes of the navigation object. Will
  *                          overwrite unless not set.
  * @return $this 
  * @static 
  */
 public static function tabs($links = array(), $attributes = null)
 {
     return \Bootstrapper\Navigation::tabs($links, $attributes);
 }