-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel module email assertions #22
Comments
We have |
I could just provide assertions for the last email that was sent, things like One option is to just loop through all emails that were sent and check if one of those satisfies the assertion. Another option is to just add a method In the Laracast video Jeffrey adds a second optional parameter for the message object to the assertion methods, but if we do that the assertions should probably have other names. Any preferences or other ideas? |
My preferable syntax will be: seeEmailIsSent(array $params = null, $num = 1); so to be used as: $I->seeEmailIsSent();
$I->seeEmailIsSent(['from' => '[email protected]'], 2);
$I->seeEmailIsSent(['subject' => 'XXX', 'from' => 'yyyy']); |
Ok, that look's good to me too. I don't know when I have time to implement it yet though. |
Yep, that's always an issue. Maybe someone who accidentally finds oneself here will have a chance to implement it =) |
Accidentally found myself here and I am considering implementing this. Is there any documentation on the inner workings of Codeception's email support? @janhenkgerritsen I can help out if you're still interested in implementing this. |
There is no such thing as "Codeception email support", this functionality is module specific. |
It would be great if you implement this, because I don't really have the time to do this myself. So if you come up with a nice solution it will definitely get merged :) |
@janhenkgerritsen Sounds good! I will start working on it now. |
@janhenkgerritsen, @grahamsutton - any progress on implementing email assertions? If not, then I'll be happy to try to push something this weekend. |
Add email assertions to Laravel 5 module.
Idea for implementation came from https://laracasts.com/series/phpunit-testing-in-laravel/episodes/12. Will work with all default mail transports in Laravel, they all have the
beforeSendPerformed
method.Have to think about a good API for these assertions though.
The text was updated successfully, but these errors were encountered: