Exemple #1
0
 public function testDefaultIconPrefix()
 {
     Icon::$defaultIconPrefix = '';
     $tag = new Icon('foo');
     $this->assertEquals('<i class="foo"></i>', $tag->getHTML());
     Icon::$defaultIconPrefix = Icon::GLYPHICON;
     $tag = new Icon('foo');
     $this->assertEquals('<i class="glyphicon glyphicon-foo"></i>', $tag->getHTML());
     Icon::$defaultIconPrefix = Icon::FONT_AWESOME;
     $tag = new Icon('foo');
     $this->assertEquals('<i class="fa fa-foo"></i>', $tag->getHTML());
     Icon::$defaultIconPrefix = 'bar';
     $tag = new Icon('foo');
     $this->assertEquals('<i class="barfoo"></i>', $tag->getHTML());
 }
Exemple #2
0
 /**
  * @return $this
  */
 public function fa()
 {
     $this->uiElement->fontAwesome();
     return $this;
 }