File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/TwigComponent/tests/Integration Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -341,6 +341,15 @@ public function testRenderingHtmlSyntaxComponentWithNestedAttributes(): void
341
341
);
342
342
}
343
343
344
+ public function testComponentWithPropsFromTemplateAndClass (): void
345
+ {
346
+ $ output = self ::getContainer ()->get (Environment::class)->render ('component_with_props_from_template_and_class.html.twig ' );
347
+
348
+ $ this ->assertStringContainsString ('data-color= \'success \'' , $ output );
349
+ $ this ->assertStringContainsString ('data-size= \'lg \'' , $ output );
350
+ $ this ->assertStringContainsString ('Congrats ! ' , $ output );
351
+ }
352
+
344
353
private function renderComponent (string $ name , array $ data = []): string
345
354
{
346
355
return self ::getContainer ()->get (Environment::class)->render ('render_component.html.twig ' , [
You can’t perform that action at this time.
0 commit comments