Skip to content

Commit 234a7dd

Browse files
committed
add test
1 parent 8615407 commit 234a7dd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/TwigComponent/tests/Integration/ComponentExtensionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,15 @@ public function testRenderingHtmlSyntaxComponentWithNestedAttributes(): void
341341
);
342342
}
343343

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+
344353
private function renderComponent(string $name, array $data = []): string
345354
{
346355
return self::getContainer()->get(Environment::class)->render('render_component.html.twig', [

0 commit comments

Comments
 (0)