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
Description
Since 4.4, we have new PHPUnit constraints for the mailer component, but these are only available with WebTestCase and not KernelTestCase. I think this would be useful to access these constraints from both TestCase. If the email is queued, we could use the assertQueuedEmailCount() function.
Example
For instance, I have a service which sends an email with an attached document, I would like to test that the email is correctly sent and that there is an attached document with it.
The text was updated successfully, but these errors were encountered:
…estCase (adrienfr)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[FrameworkBundle] Use MailerAssertionsTrait in KernelTestCase
| Q | A
| ------------- | ---
| Branch? | 4.4+
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#35510
| License | MIT
| Doc PR |
Since 4.4, we have new PHPUnit constraints for the mailer component, but these are only available with `WebTestCase` and not `KernelTestCase`. I think this would be useful to access these constraints from both TestCase.
I don't know if I should move these [tests](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/MailerTest.php) or add new ones only for `KernelTestCase`?
Commits
-------
1b1ab29 [FrameworkBundle] Use MailerAssertionsTrait in KernelTestCase
Description
Since 4.4, we have new PHPUnit constraints for the mailer component, but these are only available with
WebTestCase
and notKernelTestCase
. I think this would be useful to access these constraints from both TestCase. If the email is queued, we could use theassertQueuedEmailCount()
function.Example
For instance, I have a service which sends an email with an attached document, I would like to test that the email is correctly sent and that there is an attached document with it.
The text was updated successfully, but these errors were encountered: