Skip to content

Commit 7217ddd

Browse files
committed
wip
1 parent eb88dff commit 7217ddd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Integration/View/ViewComponentTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,17 @@ public function test_dynamic_view_component_with_expression_name(): void
799799
$this->assertSame('<div>test</div>', $html);
800800
}
801801

802+
public function test_dynamic_view_component_with_variable_attribute(): void
803+
{
804+
$this->registerViewComponent('x-test', '<div>{{ $prop }}</div>');
805+
806+
$html = $this->render(<<<'HTML'
807+
<x-component :is="$name" :prop="$input" />
808+
HTML, name: 'x-test', input: 'test');
809+
810+
$this->assertSame('<div>test</div>', $html);
811+
}
812+
802813
private function assertSnippetsMatch(string $expected, string $actual): void
803814
{
804815
$expected = str_replace([PHP_EOL, ' '], '', $expected);

0 commit comments

Comments
 (0)