Skip to content

Commit d159a4a

Browse files
Nicolas Appriouwouterj
Nicolas Appriou
authored andcommitted
[HttpFoundation] Update http response test constraint signature
1 parent 1082c01 commit d159a4a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

testing.rst

+8-4
Original file line numberDiff line numberDiff line change
@@ -961,11 +961,11 @@ However, Symfony provides useful shortcut methods for the most common cases:
961961
Response Assertions
962962
...................
963963

964-
``assertResponseIsSuccessful(string $message = '')``
964+
``assertResponseIsSuccessful(string $message = '', bool $verbose = true)``
965965
Asserts that the response was successful (HTTP status is 2xx).
966-
``assertResponseStatusCodeSame(int $expectedCode, string $message = '')``
966+
``assertResponseStatusCodeSame(int $expectedCode, string $message = '', bool $verbose = true)``
967967
Asserts a specific HTTP status code.
968-
``assertResponseRedirects(?string $expectedLocation = null, ?int $expectedCode = null, string $message = '')``
968+
``assertResponseRedirects(?string $expectedLocation = null, ?int $expectedCode = null, string $message = '', bool $verbose = true)``
969969
Asserts the response is a redirect response (optionally, you can check
970970
the target location and status code). The excepted location can be either
971971
an absolute or a relative path.
@@ -983,9 +983,13 @@ Response Assertions
983983
Asserts the response format returned by the
984984
:method:`Symfony\\Component\\HttpFoundation\\Response::getFormat` method
985985
is the same as the expected value.
986-
``assertResponseIsUnprocessable(string $message = '')``
986+
``assertResponseIsUnprocessable(string $message = '', bool $verbose = true)``
987987
Asserts the response is unprocessable (HTTP status is 422)
988988

989+
.. versionadded:: 7.1
990+
991+
The ``$verbose`` parameters were introduced in Symfony 7.1.
992+
989993
Request Assertions
990994
..................
991995

0 commit comments

Comments
 (0)