-
-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make remove method immutable and test if attributes are still render
- Loading branch information
matheo
committed
Aug 18, 2023
1 parent
66b7f58
commit 416c46a
Showing
5 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/TwigComponent/tests/Fixtures/templates/anonymous_component_none_scalar_prop.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<twig:UserCard :user='user'/> | ||
<twig:UserCard :user='user' class='foo'/> |
2 changes: 1 addition & 1 deletion
2
src/TwigComponent/tests/Fixtures/templates/components/UserCard.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{% props user %} | ||
|
||
<div {{ attributes }} class='user-card'> | ||
<div {{ attributes }}> | ||
<p>{{ user.name }}</p> | ||
<p>{{ user.email }}</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,6 +189,7 @@ public function testRenderAnonymousComponentWithNonScalarProps(): void | |
|
||
$output = self::getContainer()->get(Environment::class)->render('anonymous_component_none_scalar_prop.html.twig', ['user' => $user]); | ||
|
||
$this->assertStringContainsString('class="foo"', $output); | ||
$this->assertStringContainsString('Fabien', $output); | ||
$this->assertStringContainsString('[email protected]', $output); | ||
} | ||
|