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

Conversation

@ohnotnow
Copy link
Contributor

ohnotnow commented Jan 11, 2020

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
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/styleci/pr Issues have been identified with 1 file
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ohnotnow ohnotnow deleted the ohnotnow:pr/add-mailable-names-to-assertions branch Jan 13, 2020
@ohnotnow

This comment has been minimized.

Copy link
Contributor Author

ohnotnow commented Jan 13, 2020

Oh! Thanks! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.