', ], [ 'star', [ 'tag' => 'i', 'prefix' => 'my-icon icon-', ], '', ], ]; } /** * @dataProvider dataProviderIcon * * @param $name * @param $options * @param $expectedHtml */ public function testIcon($name, array $options, $expectedHtml) { $this->assertEquals($expectedHtml, Html::icon($name, $options)); } /** * @return array */ public function dataProviderStaticControl() { return [ [ 'foo', [], '
foo
' ], [ '', [], '<html>
' ], [ '', [ 'encode' => false ], '' ], ]; } /** * @dataProvider dataProviderStaticControl * * @param string $value * @param array $options * @param string $expectedHtml */ public function testStaticControl($value, array $options, $expectedHtml) { $this->assertEquals($expectedHtml, Html::staticControl($value, $options)); } }