From 0fbfa16a2e76811be25d5e7ea82a39700497d710 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 24 Apr 2024 11:41:13 +0200 Subject: [PATCH] fix test --- tests/Functional/Controller/TwigDocControllerTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Functional/Controller/TwigDocControllerTest.php b/tests/Functional/Controller/TwigDocControllerTest.php index b87fbfe..1c5c7d8 100644 --- a/tests/Functional/Controller/TwigDocControllerTest.php +++ b/tests/Functional/Controller/TwigDocControllerTest.php @@ -48,9 +48,11 @@ public function testFilterComponents(): void $crawler = $this->client->request(Request::METHOD_GET, '/', ['filterQuery' => 'ButtonSubmit', 'filterType' => 'name']); $node = $crawler->filter('div.twig-doc-component'); + $nodeContent = $node->filter('h3')->getNode(0)->nodeValue; static::assertResponseIsSuccessful(); static::assertCount(1, $node); - static::assertEquals('Submit Button (tests/TestApp/templates/components/ButtonSubmit.html.twig)', $node->filter('h3')->getNode(0)->nodeValue); + static::assertStringEndsWith('(tests/TestApp/templates/components/ButtonSubmit.html.twig)', $nodeContent); + static::assertStringStartsWith('Submit Button', $nodeContent); } public function testInvalidComponentsRoute(): void