Exemplo n.º 1
0
 public function testMenuAttributes()
 {
     $navbar = Navbar::create()->with_menus(Navigation::links(array(array('foo', '#'), array('bar', '#'))), array('class' => 'foo', 'data-foo' => 'bar'));
     $matcher = $this->getBasicMatcher();
     $matcher['child']['child']['child'] = array('tag' => 'ul', 'attributes' => array('class' => 'nav foo', 'data-foo' => 'bar'), 'children' => array('count' => 2, 'only' => array('tag' => 'li')));
     $this->assertTag($matcher, $navbar);
 }
Exemplo n.º 2
0
 /**
  * Adds the given classes to attributes
  *
  * @param array $classes
  * @return $this 
  * @static 
  */
 public static function addClass($classes)
 {
     //Method inherited from \Bootstrapper\RenderedObject
     return \Bootstrapper\Navbar::addClass($classes);
 }
Exemplo n.º 3
0
    public function testWeCanPassHTMLToTheBrand()
    {
        $navbar = Navbar::create()->with_brand('<div>Bootstrapper</div>', '#', false);
        $matcher = $this->getBasicMatcher();
        $matcher['child']['child']['child'] = array(
            'tag' => 'a',
            'attributes' => array('class' => 'navbar-brand', 'href' => '#'),
            'child' => array(
                'tag' => 'div',
                'content' => 'Bootstrapper'
            )
        );

        $this->assertHTML($matcher, $navbar);

    }