From 1a77c9400a3b844b78f8a2e1ac1df603505e01d0 Mon Sep 17 00:00:00 2001 From: Valmonzo Date: Fri, 17 Jan 2025 19:10:37 +0100 Subject: [PATCH] [TwigComponent][Docs] add explicit string cast on string assertions --- src/TwigComponent/doc/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TwigComponent/doc/index.rst b/src/TwigComponent/doc/index.rst index f06882e2a3d..efccbcc6d15 100644 --- a/src/TwigComponent/doc/index.rst +++ b/src/TwigComponent/doc/index.rst @@ -1342,7 +1342,7 @@ You can test how your component is mounted and rendered using the data: ['foo' => 'bar'], ); - $this->assertStringContainsString('bar', $rendered); + $this->assertStringContainsString('bar', (string) $rendered); // use the crawler $this->assertCount(5, $rendered->crawler()->filter('ul li')); @@ -1360,7 +1360,7 @@ You can test how your component is mounted and rendered using the ], ); - $this->assertStringContainsString('bar', $rendered); + $this->assertStringContainsString('bar', (string) $rendered); } }