-
Notifications
You must be signed in to change notification settings - Fork 19
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
Call to an undefined method Mockery\Expectation::shouldReceive() after chaining onto andReturn
#8
Comments
mr-feek
added a commit
to mr-feek/phpstan-mockery
that referenced
this issue
Aug 13, 2019
I confirm the bug is still present as of phpstan 1.0.* A temporary solution is to use an ignore comment to silence the error: /** @phpstan-ignore-next-line */
$this->partialMock(User::class)
->shouldReceive('plan')
->andReturn(Plan::where('id', Plan::FREE)->firstOrFail()); |
It seems this is failing because
|
This issue still exist |
I'm having this problem :( |
@StuartCowley your approach worked for me, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
similar to #3
I am still experiencing the following code as failing on
0.11.2
Currently, the second shouldReceive call will trigger this error:
Call to an undefined method Mockery\Expectation::shouldReceive().
The text was updated successfully, but these errors were encountered: