Skip to content

Commit 1d7a374

Browse files
committed
minor #21103 [FrameworkBundle] allow to unverbose all the methods in BrowserKitAssertionsTrait (vinceAmstoutz)
This PR was merged into the 7.4 branch. Discussion ---------- [FrameworkBundle] allow to unverbose all the methods in `BrowserKitAssertionsTrait` Solves #21095 Commits ------- 88c022d docs(FrameworkBundle): allow to unverbose all the methods in BrowserKitAssertionsTrait
2 parents bbaada7 + 88c022d commit 1d7a374

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

testing.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -963,11 +963,11 @@ However, Symfony provides useful shortcut methods for the most common cases:
963963
Response Assertions
964964
...................
965965

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

991991
.. versionadded:: 7.1
992992

993993
The ``$verbose`` parameters were introduced in Symfony 7.1.
994994

995+
.. versionadded:: 7.4
996+
997+
The ``$defaultVerboseMode = true;`` attribute was introduced in
998+
:class:`Symfony\\Bundle\\FrameworkBundle\\Test\\BrowserKitAssertionsTrait`
999+
in Symfony 7.4. This attribute allows you to define the default verbosity
1000+
for all applicable assertions within the trait, overriding the initial `null`
1001+
value of the `$verbose` parameter.
1002+
1003+
9951004
Request Assertions
9961005
..................
9971006

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