Skip to content

Commit 1928fb6

Browse files
committed
[DomCrawler][FrameworkBundle] Add assertSelectorCount
1 parent 7a79bc7 commit 1928fb6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

testing.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,8 @@ Crawler Assertions
10201020
``assertSelectorExists(string $selector, string $message = '')``/``assertSelectorNotExists(string $selector, string $message = '')``
10211021
Asserts that the given selector does (not) match at least one element
10221022
in the response.
1023+
``assertSelectorCount(int $expectedCount, string $selector, string $message = '')``
1024+
Asserts that the expected number of selector elements are in the response
10231025
``assertSelectorTextContains(string $selector, string $text, string $message = '')``/``assertSelectorTextNotContains(string $selector, string $text, string $message = '')``
10241026
Asserts that the first element matching the given selector does (not)
10251027
contain the expected text.
@@ -1039,6 +1041,10 @@ Crawler Assertions
10391041
Asserts that value of the field of the first form matching the given
10401042
selector does (not) equal the expected value.
10411043

1044+
.. versionadded:: 6.3
1045+
1046+
The ``assertSelectorCount()`` method was introduced in Symfony 6.3.
1047+
10421048
Mailer Assertions
10431049
.................
10441050

0 commit comments

Comments
 (0)