You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Codeception/Module/Symfony/MailerAssertionsTrait.php
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -20,10 +20,9 @@ public function dontSeeEmailIsSent(): void
20
20
}
21
21
22
22
/**
23
-
* Checks if the desired number of emails was sent.
24
-
* Asserts that 1 email was sent by default, specify the `expectedCount` parameter to modify it.
25
-
* The email is checked using Symfony message logger, which means:
26
-
* * If your app performs a redirect after sending the email, you need to suppress it using [stopFollowingRedirects](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects).
23
+
* Checks if the given number of emails was sent (default `$expectedCount`: 1).
24
+
* The check is based on `\Symfony\Component\Mailer\EventListener\MessageLoggerListener`, which means:
25
+
* If your app performs a HTTP redirect after sending the email, you need to suppress it using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first.
27
26
*
28
27
* ```php
29
28
* <?php
@@ -90,4 +89,4 @@ protected function getMessageMailerEvents(): MessageEvents
90
89
91
90
$this->fail("Emails can't be tested without Symfony Mailer service.");
0 commit comments