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

Appearance settings

[Mailer] Add a MailerAssertionsTrait in KernelTestCase #35510

Copy link
Copy link
Closed
@adrienfr

Description

@adrienfr
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.