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

[Testing] Documented the changes in MailerAssertionsTrait#13050

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:masterfromjaviereguiluz:fix_13044
Mar 12, 2020
Merged
Changes fromall 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
30 changes: 23 additions & 7 deletionstesting/functional_tests_assertions.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,17 +19,17 @@ Now here is the example with the assertions specific to Symfony::

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

.. note::

These assertions only work if a request has been made with the ``Client``
in a test case extending the ``WebTestCase`` class.

Assertions Reference
---------------------

Response
~~~~~~~~

.. note::

The following assertions only work if a request has been made with the
``Client`` in a test case extending the ``WebTestCase`` class.

- ``assertResponseIsSuccessful()``
- ``assertResponseStatusCodeSame()``
- ``assertResponseRedirects()``
Expand All@@ -44,12 +44,22 @@ Response
Request
~~~~~~~

.. note::

The following assertions only work if a request has been made with the
``Client`` in a test case extending the ``WebTestCase`` class.

- ``assertRequestAttributeValueSame()``
- ``assertRouteSame()``

Browser
~~~~~~~

.. note::

The following assertions only work if a request has been made with the
``Client`` in a test case extending the ``WebTestCase`` class.

- ``assertBrowserHasCookie()``
- ``assertBrowserNotHasCookie()``
- ``assertBrowserCookieValueSame()``
Expand All@@ -59,8 +69,9 @@ Crawler

.. note::

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

- ``assertSelectorExists()``
- ``assertSelectorNotExists()``
Expand All@@ -75,6 +86,11 @@ Crawler
Mailer
~~~~~~

.. versionadded:: 5.1

Starting from Symfony 5.1, the following assertions no longer require to make
a request with the ``Client`` in a test case extending the ``WebTestCase`` class.

- ``assertEmailCount()``
- ``assertQueuedEmailCount()``
- ``assertEmailIsQueued()``
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp