kocal/symfony-mailer-testing

Test your emails with Behat and Cypress, when using the Symfony Mailer component.

Maintainers

Package info

github.com/Kocal/SymfonyMailerTesting

pkg:composer/kocal/symfony-mailer-testing

Statistics

Installs: 255 512

Dependents: 0

Suggesters: 0

Stars: 15

Open Issues: 2

v1.4.0 2025-11-07 21:53 UTC

README

Package version PHP supported versions Symfony supported version License CI

Test emails sent by the Symfony Mailer with Behat and Cypress.

This testing library provides the same PHPUnit assertions for Email Messages from Symfony, but for Behat and Cypress:

  • assertEmailCount
  • assertQueuedEmailCount
  • assertEmailIsQueued
  • assertEmailIsNotQueued
  • assertEmailAttachmentCount
  • assertEmailTextBodyContains
  • assertEmailTextBodyNotContains
  • assertEmailHtmlBodyContains
  • assertEmailHtmlBodyNotContains
  • assertEmailHasHeader
  • assertEmailNotHasHeader
  • assertEmailHeaderSame
  • assertEmailHeaderNotSame
  • assertEmailAddressContains

With additional assertions:

  • assertEmailSubjectSame
  • assertEmailSubjectContains
  • assertEmailSubjectMatches
  • assertEmailTextBodyMatches
  • assertEmailTextBodyNotMatches
  • assertEmailHtmlBodyMatches
  • assertEmailHtmlBodyNotMatches
  • assertEmailAttachmentNameSame
  • assertEmailAttachmentNameMatches

Documentation

The documentation can be found at ./docs.