From 189d0af74ab3eb78e881775df1779c8152d086a9 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Sun, 1 Oct 2023 10:48:38 +0200 Subject: [PATCH] [FrameworkBundle] Allow BrowserKit relative URL redirect assert --- testing.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testing.rst b/testing.rst index df24c4f8601..5e59ed56b1d 100644 --- a/testing.rst +++ b/testing.rst @@ -925,7 +925,8 @@ Response Assertions Asserts a specific HTTP status code. ``assertResponseRedirects(string $expectedLocation = null, int $expectedCode = null, string $message = '')`` Asserts the response is a redirect response (optionally, you can check - the target location and status code). + the target location and status code). The excepted location can be either + an absolute or a relative path. ``assertResponseHasHeader(string $headerName, string $message = '')``/``assertResponseNotHasHeader(string $headerName, string $message = '')`` Asserts the given header is (not) available on the response, e.g. ``assertResponseHasHeader('content-type');``. ``assertResponseHeaderSame(string $headerName, string $expectedValue, string $message = '')``/``assertResponseHeaderNotSame(string $headerName, string $expectedValue, string $message = '')`` @@ -943,6 +944,10 @@ Response Assertions ``assertResponseIsUnprocessable(string $message = '')`` Asserts the response is unprocessable (HTTP status is 422) +.. versionadded:: 6.4 + The support for relative path in ``assertResponseRedirects()`` was introduced + in Symfony 6.4. + Request Assertions ..................