@@ -19,17 +19,17 @@ Now here is the example with the assertions specific to Symfony::
19
19
20
20
$this->assertSelectorTextContains('html', 'Hello World');
21
21
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
-
27
22
Assertions Reference
28
23
---------------------
29
24
30
25
Response
31
26
~~~~~~~~
32
27
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
+
33
33
- ``assertResponseIsSuccessful() ``
34
34
- ``assertResponseStatusCodeSame() ``
35
35
- ``assertResponseRedirects() ``
@@ -44,12 +44,22 @@ Response
44
44
Request
45
45
~~~~~~~
46
46
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
+
47
52
- ``assertRequestAttributeValueSame() ``
48
53
- ``assertRouteSame() ``
49
54
50
55
Browser
51
56
~~~~~~~
52
57
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
+
53
63
- ``assertBrowserHasCookie() ``
54
64
- ``assertBrowserNotHasCookie() ``
55
65
- ``assertBrowserCookieValueSame() ``
@@ -59,8 +69,9 @@ Crawler
59
69
60
70
.. note ::
61
71
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.
64
75
65
76
- ``assertSelectorExists() ``
66
77
- ``assertSelectorNotExists() ``
@@ -75,6 +86,11 @@ Crawler
75
86
Mailer
76
87
~~~~~~
77
88
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
+
78
94
- ``assertEmailCount() ``
79
95
- ``assertQueuedEmailCount() ``
80
96
- ``assertEmailIsQueued() ``
0 commit comments