-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Illuminate\Queue\CallQueuedHandler uses a non existent function in Illuminate\Contracts\Bus\Dispatcher #22951
Comments
It's just that the contract is missing a few methods, feel free to send a PR on 5.6 to add the missing methods. |
I'm currently getting the same error: BadMethodCallException : Method Mockery_0_Illuminate_Contracts_Bus_Dispatcher::getCommandHandler() does not exist on this mock object I've upgraded to version 5.6.26. What's weird to me is that I can use the expectsJobs in another context where I use "dispatch" directly, but it's failing in this context where I'm expecting it to be fired as a reaction from an event. |
I was also getting this error on Laravel 5.3:
I'm not able to upgrade the Laravel version to 5.6 right now so I implemented a workaround by overriding the |
Did you find a solution for this one? |
I did! Finally. And I made a pull request to boot! (Which is linked above) |
Description:
framework/src/Illuminate/Queue/CallQueuedHandler.php
Line 70 in f50e200
In this file,
$this->dispatcher
is an instance of Illuminate\Contracts\Bus\Dispatcher.Illuminate\Contracts\Bus\Dispatcher has no method getCommandHandler defined so when mockery create a mock of the dispatcher, the function getCommandHandler is not available.
You get this error:
Steps To Reproduce:
This test generates the error.
The text was updated successfully, but these errors were encountered: