本文整理汇总了PHP中rmrevin\yii\fontawesome\FA::s方法的典型用法代码示例。如果您正苦于以下问题:PHP FA::s方法的具体用法?PHP FA::s怎么用?PHP FA::s使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rmrevin\yii\fontawesome\FA
的用法示例。
在下文中一共展示了FA::s方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testStackOutput
public function testStackOutput()
{
$this->assertEquals((string) FA::s(), '<span class="fa-stack"></span>');
$this->assertEquals((string) FA::stack(), '<span class="fa-stack"></span>');
$this->assertEquals((string) FA::stack()->tag('div'), '<div class="fa-stack"></div>');
$this->assertEquals((string) FA::stack()->icon('cog'), '<span class="fa-stack"><i class="fa fa-cog fa-stack-1x"></i></span>');
$this->assertEquals((string) FA::stack()->on('square-o'), '<span class="fa-stack"><i class="fa fa-square-o fa-stack-2x"></i></span>');
$this->assertEquals((string) FA::stack()->icon('cog')->on('square-o'), '<span class="fa-stack"><i class="fa fa-square-o fa-stack-2x"></i><i class="fa fa-cog fa-stack-1x"></i></span>');
$this->assertEquals((string) FA::stack(['data-role' => 'stack'])->icon('cog', ['data-role' => 'icon'])->on('square-o', ['data-role' => 'background']), '<span class="fa-stack" data-role="stack"><i class="fa fa-square-o fa-stack-2x" data-role="background"></i><i class="fa fa-cog fa-stack-1x" data-role="icon"></i></span>');
$this->assertEquals((string) FA::stack()->icon((new Icon('cog'))->spin())->on((new Icon('square-o'))->size(FA::SIZE_3X)), '<span class="fa-stack"><i class="fa fa-square-o fa-3x fa-stack-2x"></i><i class="fa fa-cog fa-spin fa-stack-1x"></i></span>');
$this->assertEquals((string) FA::stack()->icon(FA::Icon('cog')->spin())->on(FA::Icon('square-o')->size(FA::SIZE_3X)), '<span class="fa-stack"><i class="fa fa-square-o fa-3x fa-stack-2x"></i><i class="fa fa-cog fa-spin fa-stack-1x"></i></span>');
$this->assertNotEquals((string) FA::stack()->icon((string) FA::Icon('cog')->spin())->on((string) FA::Icon('square-o')->size(FA::SIZE_3X)), '<span class="fa-stack"><i class="fa fa-square-o fa-3x fa-stack-2x"></i><i class="fa fa-cog fa-spin fa-stack-1x"></i></span>');
}