-
Notifications
You must be signed in to change notification settings - Fork 462
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
instance mock and normal mock different behaviour while calling another method inside class #1186
Comments
Hey @sakarikl I believe the behavior you are describing is $object = new Test();
$mock1 = \Mockery::instanceMock($object)->makePartial();
// ^ $mock1 is the same as $mock2 ⌄
$mock2 = \Mockery::mock($object)->makePartial();
In the example code you provided, the |
results in
string(4) "mock"
string(3) "own"
string(4) "mock"
string(4) "mock"
Instance mock does not mock test method which is called from test2 method. I did not find any documentation stating this behaviour.
The text was updated successfully, but these errors were encountered: