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 don't think that's possible because the registerFake method expects a class name, not an instance. If you want to fake a class MyClass, you could tell it to fake it with another class, for example MyClassFake. But Mockery::mock returns a mocked instance of MyClass, so that's probably why it doesn't work.
I'll check out if I can do something with mockery before closing this issue, but I'm skeptic about it because it probably cannot be serialized.
If you're not sure why it needs to be serialized read the How does it work? section on the readme.
Would it be an idea to let the registerFake method support Mockery instances?
Right now this code:
results in a case where the mock for myClass can't be found.
The text was updated successfully, but these errors were encountered: