Skip to content

[DomCrawler][FrameworkBundle] Add assertAnySelectorText* #18704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -982,9 +982,15 @@ Crawler Assertions
``assertSelectorTextContains(string $selector, string $text, string $message = '')``/``assertSelectorTextNotContains(string $selector, string $text, string $message = '')``
Asserts that the first element matching the given selector does (not)
contain the expected text.
``assertAnySelectorTextContains(string $selector, string $text, string $message = '')``/``assertAnySelectorTextNotContains(string $selector, string $text, string $message = '')``
Asserts that any element matching the given selector does (not)
contain the expected text.
``assertSelectorTextSame(string $selector, string $text, string $message = '')``
Asserts that the contents of the first element matching the given
selector does equal the expected text.
``assertAnySelectorTextSame(string $selector, string $text, string $message = '')``
Asserts that the any element matching the given selector does equal the
expected text.
``assertPageTitleSame(string $expectedTitle, string $message = '')``
Asserts that the ``<title>`` element is equal to the given title.
``assertPageTitleContains(string $expectedTitle, string $message = '')``
Expand All @@ -1002,6 +1008,11 @@ Crawler Assertions

The ``assertSelectorCount()`` method was introduced in Symfony 6.3.

.. versionadded:: 6.4

The ``assertAnySelectorTextContains()``, ``assertAnySelectorTextNotContains()``
and ``assertAnySelectorTextSame()`` were introduced in Symfony 6.4.

.. _mailer-assertions:

Mailer Assertions
Expand Down