Skip to content

Commit 19ef1b6

Browse files
committed
minor #13050 [Testing] Documented the changes in MailerAssertionsTrait (javiereguiluz)
This PR was squashed before being merged into the master branch (closes #13050). Discussion ---------- [Testing] Documented the changes in MailerAssertionsTrait Fixes #13044. Commits ------- 5b0590e [Testing] Documented the changes in MailerAssertionsTrait
2 parents 3845543 + 5b0590e commit 19ef1b6

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

testing/functional_tests_assertions.rst

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ This is the same example using the assertions provided by Symfony::
1818

1919
$this->assertResponseRedirects('https://example.com', 301);
2020

21-
.. note::
22-
23-
These assertions only work if a request has been made with the ``Client``
24-
in a test case extending the ``WebTestCase`` class.
25-
2621
Assertions Reference
2722
---------------------
2823

2924
Response
3025
~~~~~~~~
3126

27+
.. note::
28+
29+
The following assertions only work if a request has been made with the
30+
``Client`` in a test case extending the ``WebTestCase`` class.
31+
3232
- ``assertResponseIsSuccessful()``
3333
- ``assertResponseStatusCodeSame()``
3434
- ``assertResponseRedirects()``
@@ -43,12 +43,22 @@ Response
4343
Request
4444
~~~~~~~
4545

46+
.. note::
47+
48+
The following assertions only work if a request has been made with the
49+
``Client`` in a test case extending the ``WebTestCase`` class.
50+
4651
- ``assertRequestAttributeValueSame()``
4752
- ``assertRouteSame()``
4853

4954
Browser
5055
~~~~~~~
5156

57+
.. note::
58+
59+
The following assertions only work if a request has been made with the
60+
``Client`` in a test case extending the ``WebTestCase`` class.
61+
5262
- ``assertBrowserHasCookie()``
5363
- ``assertBrowserNotHasCookie()``
5464
- ``assertBrowserCookieValueSame()``
@@ -58,8 +68,9 @@ Crawler
5868

5969
.. note::
6070

61-
You cannot use the :doc:`Crawler </components/dom_crawler>` assertions,
62-
when using `symfony/panther`_ for end-to-end testing.
71+
The following assertions only work if a request has been made with the
72+
``Client`` in a test case extending the ``WebTestCase`` class. In addition,
73+
they are not available when using `symfony/panther`_ for end-to-end testing.
6374

6475
- ``assertSelectorExists()``
6576
- ``assertSelectorNotExists()``
@@ -74,6 +85,11 @@ Crawler
7485
Mailer
7586
~~~~~~
7687

88+
.. versionadded:: 5.1
89+
90+
Starting from Symfony 5.1, the following assertions no longer require to make
91+
a request with the ``Client`` in a test case extending the ``WebTestCase`` class.
92+
7793
- ``assertEmailCount()``
7894
- ``assertQueuedEmailCount()``
7995
- ``assertEmailIsQueued()``

0 commit comments

Comments
 (0)