This Module for codeception should enable easy assertions for emails with laravel 5.1+
tecbeast/laravel-codeception-email-assertions is a Laravel package for this module for codeception should enable easy assertions for emails with laravel 5.1+.
It currently has 2 GitHub stars and 10.706 downloads on Packagist (latest version 2.0.0).
Install it with composer require tecbeast/laravel-codeception-email-assertions.
Discover more Laravel packages by tecbeast
or browse all Laravel packages to compare alternatives.
Last updated
composer require tecbeast/laravel-codeception-email-assertions
Adapt codeceptions *.suite.yml file.
E.g.
class_name: UnitTester
modules:
enabled:
- Laravel5 # this is needed before EmailAssertions
- EmailAssertions # this contains the email assertions
All assertions will always look for the last email sent in the current test. The assertions should explain them self :).
$I->seeEmailWasSent();
$I->seeNoEmailWasSent();
$I->seeEmailWasSentTo('[email protected]');
$I->seeEmailWasNotSentTo('[email protected]');
$I->seeEmailWasSentFrom('[email protected]');
$I->seeEmailWasNotSentFrom('[email protected]');
$I->seeEmailWasNotSentFrom('[email protected]');
$I->seeEmailContains('Hello');
$I->seeEmailContainsNot('Laravel');