Skip to content

Commit ca5793e

Browse files
committed
minor #2645 Fix TwigComponents test when high-deps (Kocal)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- Fix TwigComponents test when high-deps | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | yes/no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> This PR fixes the following broken checks in high-deps: ``` 1) Symfony\UX\TwigComponent\Tests\Integration\ComponentExtensionTest::testComponentWithConflictBetweenPropsFromTemplateAndClass Failed asserting that exception message 'Cannot define prop "name" in template "components/Conflict.html.twig". Property already defined in component class "Symfony\UX\TwigComponent\Tests\Fixtures\Component\Conflict" in "components/Conflict.html.twig" at line 1.' contains 'Cannot define prop "name" in template "components/Conflict.html.twig". Property already defined in component class "Symfony\UX\TwigComponent\Tests\Fixtures\Component\Conflict".'. 2) Symfony\UX\TwigComponent\Tests\Integration\EmbeddedComponentTest::testAccessingTheHierarchyTooHighThrowsAnException Failed asserting that exception message 'Key "this" for sequence/mapping with keys "app, __embedded" does not exist in "embedded_component_hierarchy_exception.html.twig" at line 2.' contains 'with keys "app, __embedded" does not exist.'. ``` https://github.com/symfony/ux/actions/runs/13929938771/job/38984295237 Commits ------- 11cce99 Fix TwigComponents test when high-deps
2 parents 40b0a0a + 11cce99 commit ca5793e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/TwigComponent/tests/Integration/ComponentExtensionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public function testComponentWithPropsFromTemplateAndClass(): void
425425
public function testComponentWithConflictBetweenPropsFromTemplateAndClass(): void
426426
{
427427
$this->expectException(RuntimeError::class);
428-
$this->expectExceptionMessage('Cannot define prop "name" in template "components/Conflict.html.twig". Property already defined in component class "Symfony\UX\TwigComponent\Tests\Fixtures\Component\Conflict".');
428+
$this->expectExceptionMessage('Cannot define prop "name" in template "components/Conflict.html.twig". Property already defined in component class "Symfony\UX\TwigComponent\Tests\Fixtures\Component\Conflict"');
429429

430430
self::getContainer()->get(Environment::class)->render('component_with_conflict_between_props_from_template_and_class.html.twig');
431431
}

src/TwigComponent/tests/Integration/EmbeddedComponentTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function testAccessingTheHierarchyTooHighThrowsAnException(): void
162162
{
163163
// Twig renamed "array" into "sequence" in 3.11
164164
$this->expectExceptionMessage('Key "$this" for ');
165-
$this->expectExceptionMessage('with keys "app, __embedded" does not exist.');
165+
$this->expectExceptionMessage('with keys "app, __embedded" does not exist');
166166
self::render('embedded_component_hierarchy_exception.html.twig');
167167
}
168168

0 commit comments

Comments
 (0)