Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kocal/symfonymailertesting
Provide Behat and Cypress API for testing emails sent by the Symfony Mailer.
https://github.com/kocal/symfonymailertesting
behat cypress mailer symfony testing
Last synced: 20 days ago
JSON representation
Provide Behat and Cypress API for testing emails sent by the Symfony Mailer.
- Host: GitHub
- URL: https://github.com/kocal/symfonymailertesting
- Owner: Kocal
- License: mit
- Created: 2020-05-07T12:29:20.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-01T07:30:29.000Z (3 months ago)
- Last Synced: 2024-10-12T23:12:56.563Z (about 1 month ago)
- Topics: behat, cypress, mailer, symfony, testing
- Language: PHP
- Homepage:
- Size: 21.5 MB
- Stars: 10
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Symfony Mailer Testing
![Package version](https://img.shields.io/packagist/v/kocal/symfony-mailer-testing?include_prereleases)
![PHP supported versions](https://img.shields.io/packagist/php-v/kocal/symfony-mailer-testing)
![Symfony supported version](https://img.shields.io/badge/Symfony-%5E4.4%20%7C%7C%20%5E5.0%20%7C%7C%20%5E6.0-blue)
![License](https://img.shields.io/packagist/l/kocal/symfony-mailer-testing)
![CI](https://github.com/Kocal/SymfonyMailerTesting/workflows/CI/badge.svg)Test emails sent by the [Symfony Mailer](https://symfony.com/doc/current/mailer.html) with [Behat](https://docs.behat.org/en/latest/) and [Cypress](https://www.cypress.io/).
This testing library provides the same [PHPUnit assertions for Email Messages](https://symfony.com/blog/new-in-symfony-4-4-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`](./docs).