You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use not mocked method with setMethodsExcept, when only one public method is provided in class.
Current behavior
When setting methods which should not be mocked, when class in question have only one public method, that method is still mocked. Adding additional method to class solves problem.
How to reproduce
Create class with only one public method, then use MockBuilder
I think that problem, (if it truly exist, and it is not some misuse of api on my side) comes from array_diff returning and passing empty array to setMethods in setMethodsExcept instead of null. But not sure, if just doing in wouldn't break other things.
The text was updated successfully, but these errors were encountered:
Summary
I want to use not mocked method with
setMethodsExcept
, when only one public method is provided in class.Current behavior
When setting methods which should not be mocked, when class in question have only one public method, that method is still mocked. Adding additional method to class solves problem.
How to reproduce
Create class with only one public method, then use MockBuilder
Expected behavior
Method in question is not mocked.
I think that problem, (if it truly exist, and it is not some misuse of api on my side) comes from array_diff returning and passing empty array to
setMethods
insetMethodsExcept
instead of null. But not sure, if just doing in wouldn't break other things.The text was updated successfully, but these errors were encountered: