File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,32 @@ public function testTagWithAttributeSelfClosing(): void
8282 $ this ->assertSame ($ expected , $ result );
8383 }
8484
85+ /**
86+ * Test multiple self-closing tag variants
87+ *
88+ * @return void
89+ */
90+ public function testMultipleTagsWithAttributeSelfClosing (): void
91+ {
92+ $ element = '<c-youtube src="RLdsCL4RDf8" /><c-youtube src="RLdsCL4RDf8" /> ' ;
93+ $ tagEngine = new TagEngine ([
94+ 'tag_directories ' => [__DIR__ . DIRECTORY_SEPARATOR . 'Tags ' . DIRECTORY_SEPARATOR ],
95+ ]);
96+ $ result = $ tagEngine ->parse ($ element );
97+ $ expected = <<<HTML
98+ <iframe width="560" height="315"
99+ src="https://www.youtube.com/embed/RLdsCL4RDf8"
100+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
101+ allowfullscreen>
102+ </iframe> <iframe width="560" height="315"
103+ src="https://www.youtube.com/embed/RLdsCL4RDf8"
104+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
105+ allowfullscreen>
106+ </iframe>
107+ HTML ;
108+ $ this ->assertSame ($ expected , $ result );
109+ }
110+
85111 /**
86112 * Test tags work with multiple attributes
87113 *
You can’t perform that action at this time.
0 commit comments