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()); }
/** * @return $this */ public function fa() { $this->uiElement->fontAwesome(); return $this; }