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 @@ -263,6 +263,15 @@ public function testComponentWithClassMerge(): void
263
263
$ this ->assertStringContainsString ('class="alert alert-red alert-lg font-semibold rounded-md dark:bg-gray-600 flex p-4" ' , $ output );
264
264
}
265
265
266
+ public function testComponentWithPropsFromTemplateAndClass (): void
267
+ {
268
+ $ output = self ::getContainer ()->get (Environment::class)->render ('component_with_props_from_template_and_class.html.twig ' );
269
+
270
+ $ this ->assertStringContainsString ('data-color= \'success \'' , $ output );
271
+ $ this ->assertStringContainsString ('data-size= \'lg \'' , $ output );
272
+ $ this ->assertStringContainsString ('Congrats ! ' , $ output );
273
+ }
274
+
266
275
private function renderComponent (string $ name , array $ data = []): string
267
276
{
268
277
return self ::getContainer ()->get (Environment::class)->render ('render_component.html.twig ' , [
You can’t perform that action at this time.
0 commit comments