Skip to content

Commit

Permalink
Use publicly accessible route in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
escopecz committed Nov 26, 2024
1 parent 14db05f commit 431ed8d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
}

0 comments on commit 431ed8d

Please sign in to comment.