Skip to content

Commit 97724fc

Browse files
committed
bug #1940 [TwigComponent] Ignore array|sequence in exception message (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [TwigComponent] Ignore array|sequence in exception message Twig switched from using "array" to "sequence" in 3.11 (#4106) So let's go simple and test start/end of the exception message there Commits ------- 8b7f824 [TwigComponent] Ignore array|sequence in exception message
2 parents 5467d57 + 8b7f824 commit 97724fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/TwigComponent/tests/Integration/EmbeddedComponentTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ public function testBlockDefinitionCanAccessTheContextOfTheDestinationBlocks():
160160

161161
public function testAccessingTheHierarchyTooHighThrowsAnException(): void
162162
{
163-
$this->expectExceptionMessage('Key "this" for array with keys "app, __embedded" does not exist.');
163+
// Twig renamed "array" into "sequence" in 3.11
164+
$this->expectExceptionMessage('Key "$this" for ');
165+
$this->expectExceptionMessage('with keys "app, __embedded" does not exist.');
164166
self::render('embedded_component_hierarchy_exception.html.twig');
165167
}
166168

0 commit comments

Comments
 (0)