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] Queue::bulk() fake now properly pushes expected jobs #23294

Merged
merged 4 commits into from
Feb 26, 2018
Merged

[5.6] Queue::bulk() fake now properly pushes expected jobs #23294

merged 4 commits into from
Feb 26, 2018

Conversation

bkuhl
Copy link
Contributor

@bkuhl bkuhl commented Feb 25, 2018

Currently Laravel is unable to perform assertions on work pushed to the queue in a bulk fashion because the fake queue does not actually push the given jobs. This PR enables work (when using the Fake) to actually be pushed to the queue, allowing tests to perform assertions.

@bkuhl bkuhl changed the title bulk() now properly pushes expected jobs Queue::bulk() fake now properly pushes expected jobs Feb 25, 2018
@bkuhl
Copy link
Contributor Author

bkuhl commented Feb 25, 2018

This PR also now passes $data and $queue onto push() so that queue-specific assertions can be properly asserted.

@tillkruss tillkruss changed the title Queue::bulk() fake now properly pushes expected jobs [5.6] Queue::bulk() fake now properly pushes expected jobs Feb 25, 2018
@jmarcher
Copy link
Contributor

Can you provide some tests for this change?

@bkuhl
Copy link
Contributor Author

bkuhl commented Feb 26, 2018

@jmarcher Test has been added

@taylorotwell taylorotwell merged commit 894492d into laravel:5.6 Feb 26, 2018
@bkuhl bkuhl deleted the patch-1 branch February 26, 2018 14:03
@bkuhl
Copy link
Contributor Author

bkuhl commented Feb 26, 2018

For full transparency, this issue also exists in Laravel 5.5.

@souzavitor
Copy link
Contributor

Will this issue be resolved in Laravel 5.5?

@GrahamCampbell
Copy link
Member

Feel free to PR this to 5.5. We can only automatically handle this if it went to 5.5 first, then we'd just merge upwards.

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.

5 participants