Skip to content

Commit 189d0af

Browse files
[FrameworkBundle] Allow BrowserKit relative URL redirect assert
1 parent 80f7c9e commit 189d0af

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

testing.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,8 @@ Response Assertions
925925
Asserts a specific HTTP status code.
926926
``assertResponseRedirects(string $expectedLocation = null, int $expectedCode = null, string $message = '')``
927927
Asserts the response is a redirect response (optionally, you can check
928-
the target location and status code).
928+
the target location and status code). The excepted location can be either
929+
an absolute or a relative path.
929930
``assertResponseHasHeader(string $headerName, string $message = '')``/``assertResponseNotHasHeader(string $headerName, string $message = '')``
930931
Asserts the given header is (not) available on the response, e.g. ``assertResponseHasHeader('content-type');``.
931932
``assertResponseHeaderSame(string $headerName, string $expectedValue, string $message = '')``/``assertResponseHeaderNotSame(string $headerName, string $expectedValue, string $message = '')``
@@ -943,6 +944,10 @@ Response Assertions
943944
``assertResponseIsUnprocessable(string $message = '')``
944945
Asserts the response is unprocessable (HTTP status is 422)
945946

947+
.. versionadded:: 6.4
948+
The support for relative path in ``assertResponseRedirects()`` was introduced
949+
in Symfony 6.4.
950+
946951
Request Assertions
947952
..................
948953

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy