Release 2.21.0 (#5014)

This commit is contained in:
Kevin Papst
2024-08-28 17:16:37 +02:00
committed by GitHub
parent 75fa7a20b8
commit b1903ba183
54 changed files with 284 additions and 430 deletions

View File

@@ -178,18 +178,19 @@ abstract class ControllerBaseTest extends WebTestCase
/** @var RedirectResponse $response */
$response = $client->getResponse();
self::assertInstanceOf(RedirectResponse::class, $response);
self::assertTrue(
$response->isRedirect(),
\sprintf('The secure URL %s is not protected.', $url)
\sprintf('The URL %s is not protected (%s occurred).', $url, $response->getStatusCode())
);
self::assertStringEndsWith(
'/login',
$response->getTargetUrl(),
\sprintf('The secure URL %s does not redirect to the login form.', $url)
\sprintf('The URL %s does not redirect to the login form.', $url)
);
self::assertInstanceOf(RedirectResponse::class, $response);
}
protected function assertSuccessResponse(HttpKernelBrowser $client, string $message = ''): void