9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
- namespace Symfony \UX \Icons \Tests \Integration \ Twig ;
12
+ namespace Symfony \UX \Icons \Tests \Integration ;
13
13
14
14
use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
15
15
use Twig \Environment ;
16
16
17
17
/**
18
18
* @author Kevin Bond <[email protected] >
19
19
*/
20
- final class UXIconExtensionTest extends KernelTestCase
20
+ final class RenderIconsInTwigTest extends KernelTestCase
21
21
{
22
22
public function testRenderIcons (): void
23
23
{
24
24
$ output = self ::getContainer ()->get (Environment::class)->createTemplate (<<<TWIG
25
25
<ul class="svg">
26
26
<li id="first">{{ ux_icon('user', {class: 'h-6 w-6'}) }}</li>
27
27
<li id="second">{{ ux_icon('user') }}</li>
28
- <li id="third">{{ ux_icon('sub:check') }}</li>
28
+ <li id="third">{{ ux_icon('sub:check', {'data-action': 'string "with" quotes'} ) }}</li>
29
29
<li id="fifth"><twig:Icon name="user" class="h-6 w-6" /></li>
30
30
<li id="sixth"><twig:Icon name="sub:check" /></li>
31
31
</ul>
@@ -36,7 +36,7 @@ public function testRenderIcons(): void
36
36
<ul class="svg">
37
37
<li id="first"><svg viewBox="0 0 24 24" fill="currentColor" class="h-6 w-6"><path fill-rule="evenodd" d="M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z" clip-rule="evenodd"></path></svg></li>
38
38
<li id="second"><svg viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z" clip-rule="evenodd"></path></svg></li>
39
- <li id="third"><svg viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg></li>
39
+ <li id="third"><svg viewBox="0 0 24 24" fill="currentColor" data-action="string "with" quotes" ><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg></li>
40
40
<li id="fifth"><svg viewBox="0 0 24 24" fill="currentColor" class="h-6 w-6"><path fill-rule="evenodd" d="M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z" clip-rule="evenodd"></path></svg></li>
41
41
<li id="sixth"><svg viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd"></path></svg></li>
42
42
</ul>
0 commit comments