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.5] Assert how many times a mail was sent or a job was pushed to the queue #20485

Merged
merged 4 commits into from
Aug 9, 2017

Conversation

mateusjatenee
Copy link
Contributor

@mateusjatenee mateusjatenee commented Aug 9, 2017

Hey guys,

This is not a huge or important PR, but I think it would be a nice addition. It allows people to assert how many times a job was pushed to the queue or a mail was sent.

The method names are pretty bad but I couldn't think of anything else and didn't wanna mess with the default implementation.. perhaps check if $mailable is an array on the normal methods and call this different ones? like Mail::assertSent([Foo:class, 3])

Edit:

I added a commit that allows you to do this:

Mail::assertSent([Foo::class, 2]);

Instead of this Mail::assertSentTimes(Foo::class, 2);

@taylorotwell taylorotwell merged commit 8a92795 into laravel:master Aug 9, 2017
@taylorotwell
Copy link
Member

Cleaned up some syntax and variable errors. Also callbacks aren't needed at all in this scenario.

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.

None yet

2 participants