Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b1c97e7

Browse files
committed
feature #17848 42948 reduce response contraints verbosity (Nicolas Appriou)
This PR was submitted for the 6.3 branch but it was merged into the 7.1 branch instead. Discussion ---------- 42948 reduce response contraints verbosity Link the issue [#49184](symfony/symfony#49184), and [PR](symfony/symfony#49184). Update signature of HTTP response constraints. Commits ------- d159a4a [HttpFoundation] Update http response test constraint signature
2 parents 1082c01 + d159a4a commit b1c97e7

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)