Skip to content

Commit fb1930a

Browse files
committed
[Testing] Document the notifier assertions
1 parent ab6ea9c commit fb1930a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

testing.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,36 @@ Mailer Assertions
970970
address. This assertion normalizes addresses like ``Jane Smith
971971
<jane@example.com>`` into ``jane@example.com``.
972972

973+
Notifier Assertions
974+
...................
975+
976+
``assertNotificationCount(int $count, string $transport = null, string $message = '')``
977+
Asserts that the given number of notifications has been created
978+
(in total or for the given transport).
979+
``assertQueuedNotificationCount(int $count, string $transport = null, string $message = '')``
980+
Asserts that the given number of notifications are queued
981+
(in total or for the given transport).
982+
``assertNotificationIsQueued(MessageEvent $event, string $message = '')``
983+
Asserts that the given notification is queued.
984+
``assertNotificationIsNotQueued(MessageEvent $event, string $message = '')``
985+
Asserts that the given notification is not queued.
986+
``assertNotificationSubjectContains(MessageInterface $messageObject, string $text, string $message = '')``
987+
Asserts that the given text is included in the subject of
988+
the given notification.
989+
``assertNotificationSubjectNotContains(MessageInterface $messageObject, string $text, string $message = '')``
990+
Asserts that the given text is not included in the subject of
991+
the given notification.
992+
``assertNotificationTransportIsEqual(MessageInterface $messageObject, string $text, string $message = '')``
993+
Asserts that the name of the transport for the given notification
994+
is the same as the given text.
995+
``assertNotificationTransportIsNotEqual(MessageInterface $messageObject, string $text, string $message = '')``
996+
Asserts that the name of the transport for the given notification
997+
is not the same as the given text.
998+
999+
.. versionadded:: 6.2
1000+
1001+
The Notifier assertions were introduced in Symfony 6.2.
1002+
9731003
.. TODO
9741004
.. End to End Tests (E2E)
9751005
.. ----------------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy