From 431ed8d6101b90382cdfa6fcb3ba92a42a73302a Mon Sep 17 00:00:00 2001 From: John Linhart Date: Fri, 1 Nov 2024 10:31:33 +0100 Subject: [PATCH] Use publicly accessible route in the test --- .../PageBundle/Tests/Controller/NotFoundFunctionalTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/bundles/PageBundle/Tests/Controller/NotFoundFunctionalTest.php b/app/bundles/PageBundle/Tests/Controller/NotFoundFunctionalTest.php index af785e2cc7b..36df2d5383a 100644 --- a/app/bundles/PageBundle/Tests/Controller/NotFoundFunctionalTest.php +++ b/app/bundles/PageBundle/Tests/Controller/NotFoundFunctionalTest.php @@ -30,10 +30,10 @@ public function testCustom404Page(): void parent::setUpSymfony($this->configParams); // Test the custom 404 page: - $crawler = $this->client->request(Request::METHOD_GET, '/s/page-that-does-not-exist'); + $crawler = $this->client->request(Request::METHOD_GET, '/page-that-does-not-exist'); Assert::assertSame(Response::HTTP_NOT_FOUND, $this->client->getResponse()->getStatusCode()); Assert::assertStringContainsString('Custom 404 Not Found Page', $crawler->text()); Assert::assertFalse($this->client->getResponse()->isRedirection(), 'The response should not be a redirect.'); - Assert::assertSame('/s/page-that-does-not-exist', $this->client->getRequest()->getRequestUri(), 'The request URI should be the same as the original URI.'); + Assert::assertSame('/page-that-does-not-exist', $this->client->getRequest()->getRequestUri(), 'The request URI should be the same as the original URI.'); } }