Skip to content
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

[5.6] Add hint to mail fake #24911

Merged
merged 2 commits into from
Jul 20, 2018
Merged

[5.6] Add hint to mail fake #24911

merged 2 commits into from
Jul 20, 2018

Conversation

martinbean
Copy link
Contributor

In Laravel, you have to use different assertions in tests depending on if you’re queuing a mailable, or immediately sending one.

The head of development at the company I work for has just spent some time trying to test a mailable was sent that he was actually queuing. I’ve made the mistake myself in the past. I’m sure countless other developers have too.

Given that developers of all skill levels get bit by this, I’m proposing to amend the error message in assertSent() to append “Did you mean to use assertQueued() instead?” if there is one or more queued mailables. This should hopefully save a few developer headaches in the future!

@taylorotwell taylorotwell merged commit c19afaf into laravel:5.6 Jul 20, 2018
@martinbean martinbean deleted the patch-1 branch July 21, 2018 11:14
@GrahamCampbell GrahamCampbell changed the title Add hint to mail fake [5.6] Add hint to mail fake Jul 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants