From 8b7f824e7f3f941dea4f423b1cc0811efc628e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Tue, 25 Jun 2024 23:07:28 +0200 Subject: [PATCH] [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 --- src/TwigComponent/tests/Integration/EmbeddedComponentTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/TwigComponent/tests/Integration/EmbeddedComponentTest.php b/src/TwigComponent/tests/Integration/EmbeddedComponentTest.php index e7a392d9ac3..baee7f226e0 100644 --- a/src/TwigComponent/tests/Integration/EmbeddedComponentTest.php +++ b/src/TwigComponent/tests/Integration/EmbeddedComponentTest.php @@ -160,7 +160,9 @@ public function testBlockDefinitionCanAccessTheContextOfTheDestinationBlocks(): public function testAccessingTheHierarchyTooHighThrowsAnException(): void { - $this->expectExceptionMessage('Key "this" for array with keys "app, __embedded" does not exist.'); + // Twig renamed "array" into "sequence" in 3.11 + $this->expectExceptionMessage('Key "$this" for '); + $this->expectExceptionMessage('with keys "app, __embedded" does not exist.'); self::render('embedded_component_hierarchy_exception.html.twig'); }