Skip to content

Commit 8b7f824

Browse files
committed
[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
1 parent fed00e2 commit 8b7f824

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)