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

[6.x] Add mailable names to assertion messages #31106

Merged
merged 2 commits into from
Jan 13, 2020
Merged

[6.x] Add mailable names to assertion messages #31106

merged 2 commits into from
Jan 13, 2020

Conversation

ohnotnow
Copy link
Contributor

Hi,

This PR just adds the names of any mailables which were sent or queued to the assertNothingSent() and assertNothingQueued() test methods.

My reason for wanting to add this in is previously you would get a message of 'Mailables were queued unexpectedly.' which left the question 'Well, what were they?'. So I've made it print something a little more descriptive like 'The following Mailables were queued unexpectedly: Illuminate\Tests\Support\MailableStub'.

I've made it two commits as there wasn't originally a test for the assertNothingQueued() method so I've added that in with the change to the function itself.

@GrahamCampbell GrahamCampbell changed the title Pr/add mailable names to assertions [6.x] Add mailable names to assertion messages Jan 11, 2020
@taylorotwell taylorotwell merged commit 45ba8d8 into laravel:6.x Jan 13, 2020
@ohnotnow ohnotnow deleted the pr/add-mailable-names-to-assertions branch January 13, 2020 17:00
@ohnotnow
Copy link
Contributor Author

Oh! Thanks! :-)

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