Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f448af

Browse files
committed
[Testing] Documented the changes in MailerAssertionsTrait
1 parent2d57b66 commit7f448af

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
@@ -19,17 +19,17 @@ Now here is the example with the assertions specific to Symfony::
1919

2020
$this->assertSelectorTextContains('html', 'Hello World');
2121

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

3025
Response
3126
~~~~~~~~
3227

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

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

5055
Browser
5156
~~~~~~~
5257

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

6070
..note::
6171

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

6576
- ``assertSelectorExists()``
6677
- ``assertSelectorNotExists()``
@@ -75,6 +86,11 @@ Crawler
7586
Mailer
7687
~~~~~~
7788

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp