@@ -606,7 +606,7 @@ The full signature of the ``request()`` method is::
606
606
array $parameters = [],
607
607
array $files = [],
608
608
array $server = [],
609
- string $content = null,
609
+ ? string $content = null,
610
610
bool $changeHistory = true
611
611
): Crawler
612
612
@@ -1007,18 +1007,18 @@ Response Assertions
1007
1007
Asserts that the response was successful (HTTP status is 2xx).
1008
1008
``assertResponseStatusCodeSame(int $expectedCode, string $message = '') ``
1009
1009
Asserts a specific HTTP status code.
1010
- ``assertResponseRedirects(string $expectedLocation = null, int $expectedCode = null, string $message = '') ``
1010
+ ``assertResponseRedirects(? string $expectedLocation = null, ? int $expectedCode = null, string $message = '') ``
1011
1011
Asserts the response is a redirect response (optionally, you can check
1012
1012
the target location and status code).
1013
1013
``assertResponseHasHeader(string $headerName, string $message = '') ``/``assertResponseNotHasHeader(string $headerName, string $message = '') ``
1014
1014
Asserts the given header is (not) available on the response, e.g. ``assertResponseHasHeader('content-type'); ``.
1015
1015
``assertResponseHeaderSame(string $headerName, string $expectedValue, string $message = '') ``/``assertResponseHeaderNotSame(string $headerName, string $expectedValue, string $message = '') ``
1016
1016
Asserts the given header does (not) contain the expected value on the
1017
1017
response, e.g. ``assertResponseHeaderSame('content-type', 'application/octet-stream'); ``.
1018
- ``assertResponseHasCookie(string $name, string $path = '/', string $domain = null, string $message = '') ``/``assertResponseNotHasCookie(string $name, string $path = '/', string $domain = null, string $message = '') ``
1018
+ ``assertResponseHasCookie(string $name, string $path = '/', ? string $domain = null, string $message = '') ``/``assertResponseNotHasCookie(string $name, string $path = '/', ? string $domain = null, string $message = '') ``
1019
1019
Asserts the given cookie is present in the response (optionally
1020
1020
checking for a specific cookie path or domain).
1021
- ``assertResponseCookieValueSame(string $name, string $expectedValue, string $path = '/', string $domain = null, string $message = '') ``
1021
+ ``assertResponseCookieValueSame(string $name, string $expectedValue, string $path = '/', ? string $domain = null, string $message = '') ``
1022
1022
Asserts the given cookie is present and set to the expected value.
1023
1023
``assertResponseFormatSame(?string $expectedFormat, string $message = '') ``
1024
1024
Asserts the response format returned by the
@@ -1047,10 +1047,10 @@ Request Assertions
1047
1047
Browser Assertions
1048
1048
..................
1049
1049
1050
- ``assertBrowserHasCookie(string $name, string $path = '/', string $domain = null, string $message = '') ``/``assertBrowserNotHasCookie(string $name, string $path = '/', string $domain = null, string $message = '') ``
1050
+ ``assertBrowserHasCookie(string $name, string $path = '/', ? string $domain = null, string $message = '') ``/``assertBrowserNotHasCookie(string $name, string $path = '/', ? string $domain = null, string $message = '') ``
1051
1051
Asserts that the test Client does (not) have the given cookie set
1052
1052
(meaning, the cookie was set by any response in the test).
1053
- ``assertBrowserCookieValueSame(string $name, string $expectedValue, string $path = '/', string $domain = null, string $message = '') ``
1053
+ ``assertBrowserCookieValueSame(string $name, string $expectedValue, string $path = '/', ? string $domain = null, string $message = '') ``
1054
1054
Asserts the given cookie in the test Client is set to the expected
1055
1055
value.
1056
1056
``assertThatForClient(Constraint $constraint, string $message = '') ``
@@ -1108,18 +1108,18 @@ Mailer Assertions
1108
1108
Starting from Symfony 5.1, the following assertions no longer require to make
1109
1109
a request with the ``Client `` in a test case extending the ``WebTestCase `` class.
1110
1110
1111
- ``assertEmailCount(int $count, string $transport = null, string $message = '') ``
1111
+ ``assertEmailCount(int $count, ? string $transport = null, string $message = '') ``
1112
1112
Asserts that the expected number of emails was sent.
1113
- ``assertQueuedEmailCount(int $count, string $transport = null, string $message = '') ``
1113
+ ``assertQueuedEmailCount(int $count, ? string $transport = null, string $message = '') ``
1114
1114
Asserts that the expected number of emails was queued (e.g. using the
1115
1115
Messenger component).
1116
1116
``assertEmailIsQueued(MessageEvent $event, string $message = '') ``/``assertEmailIsNotQueued(MessageEvent $event, string $message = '') ``
1117
1117
Asserts that the given mailer event is (not) queued. Use
1118
- ``getMailerEvent(int $index = 0, string $transport = null) `` to
1118
+ ``getMailerEvent(int $index = 0, ? string $transport = null) `` to
1119
1119
retrieve a mailer event by index.
1120
1120
``assertEmailAttachmentCount(RawMessage $email, int $count, string $message = '') ``
1121
1121
Asserts that the given email has the expected number of attachments. Use
1122
- ``getMailerMessage(int $index = 0, string $transport = null) `` to
1122
+ ``getMailerMessage(int $index = 0, ? string $transport = null) `` to
1123
1123
retrieve a specific email by index.
1124
1124
``assertEmailTextBodyContains(RawMessage $email, string $text, string $message = '') ``/``assertEmailTextBodyNotContains(RawMessage $email, string $text, string $message = '') ``
1125
1125
Asserts that the text body of the given email does (not) contain the
0 commit comments