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] NullTransport: store messages for verification in tests #31747

Copy link
Copy link
Closed
@weaverryan

Description

@weaverryan
Issue body actions

Description
When testing, the NullTransport in mailer is an attractive thing to use... because it completely disables delivery. But, if it stored the messages that were sent to it, then, in functional tests, we could easily fetch the transport from the container and verify its contents. This is what we do for the similar InMemoruyTransport in Messenger (https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Messenger/Transport/InMemoryTransport.php).

Another option would be to add info to the profiler and use that. I'm not sure which is better - it's always felt a bit awkward to need to enable the profiler whenever I needed to check if emails were sent, but that is also its job...

Relates to #31592

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    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.