Skip to content

[FrameworkBundle] Allow BrowserKit relative URL redirect assert #18953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '')``
Expand All @@ -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
..................

Expand Down