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
How can I specify Partial Mockup for a Laravel Facade? #242
Comments
👍 Since the last PR got merged, I've had the exact same problem with Laravel methods not being mocked. |
With Also Please try updating to latest dev Mockery version and tell what happened. |
@newtonianb as @aik099 suggested, if you want a partial mock, you need to tell mockery. Runtime mocks are usually suffice and should be easier for you. I'm not 100% sure (I don't use Laravel), but I think once you've called Sentry::shouldReceive('getUser')->once()->andReturn($userInst);
Sentry::makePartial(); @modess that sounds like a different issue, could you post a new bug with more details, preferably a minimal testcase. |
ah great! thank you |
What a perfectly timed question. I was running into this exact same problem. Your suggestion was spot on. Thanks! |
First I tried this
But it gave me
So then I found out the Laravel Facades already implement Mockery so I tried directly on the facade.
But now the problem is it's not finding the other functions for that objects essentially I need the behavior of a partial mockup here but I don't see how do tell it.
This is what I need
The text was updated successfully, but these errors were encountered: