1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-19 04:41:53 +02:00

FontAwesome 5 added to admin area and bootstrap3 theme. $tp->toIcon() supports SVG sizing 2x, 3x etc.

This commit is contained in:
Cameron
2021-01-30 19:21:23 -08:00
parent 151396b1a3
commit 2dedc8719f
11 changed files with 171 additions and 84 deletions

View File

@@ -1950,6 +1950,7 @@ while($row = $sql->fetch())
public function testToGlyph()
{
$this->tp->setFontAwesome(4);
$result = $this->tp->toGlyph('fa-envelope.glyph');
$expected = "<i class='fa fa-envelope' ><!-- --></i> ";
@@ -1962,6 +1963,24 @@ while(&#036;row = &#036;sql-&gt;fetch())
$this->assertEquals($expected, $result);
$this->tp->setFontAwesome(4);
$result = $this->tp->toGlyph('fab-mailchimp'); // spefific call
$expected = "<i class='fab fa-mailchimp' ><!-- --></i> ";
$this->assertEquals($expected, $result);
$result = $this->tp->toGlyph('fas-camera'); // spefific call
$this->assertSame( "<i class='fas fa-camera' ><!-- --></i> ", $result);
}
function testToGlyphFallback()
{
$this->tp->setFontAwesome(5);
$result = $this->tp->toGlyph('fa-paypal.glyph');
$this->assertSame("<i class='fab fa-paypal' ><!-- --></i> ", $result);
}
/*
public function testToBadge()