mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Finished refactoring of exceptions
This commit is contained in:
@@ -71,7 +71,7 @@ class RestRoutesReachableIntegrationTest extends KernelTestCase
|
||||
]);
|
||||
$request->setMethod($method);
|
||||
$response = static::$kernel->handle($request);
|
||||
$this->assertTrue($this->isResponseValid($response), "Route $url with Method $method sends an 404 response and doesn't throw an EntityNotFoundHttpException!");
|
||||
$this->assertTrue($this->isResponseValid($response), "Route $url with Method $method sends an 404 response and doesn't throw an EntityNotFoundException!");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,7 +82,7 @@ class RestRoutesReachableIntegrationTest extends KernelTestCase
|
||||
private function isResponseValid(Response $response): bool
|
||||
{
|
||||
$is404 = 404 === $response->getStatusCode();
|
||||
$isEntityNotFoundHttpException = strpos($response->getContent(), 'EntityNotFoundHttpException');
|
||||
$isEntityNotFoundHttpException = strpos($response->getContent(), 'EntityNotFoundException');
|
||||
|
||||
return !$is404 || $isEntityNotFoundHttpException;
|
||||
}
|
||||
|
Reference in New Issue
Block a user