Skip to content


identicalTo() matcher for mock objects parameters #41

giorgiosironi opened this Issue · 5 comments

4 participants


Since matcher's object parameters are cloned, identicalTo() in with() calls on mock expectations always fails.
I thought it can save the spl_object_hash() somewhere before cloning the object, so that it can be matched even if the original object is thrown away. If you're interested, I can implement it.


Sounds interesting!


+1 from me, I always run into this issue when mocking.


+1 from me as well


Closing because cloning method parameter will be optional soon (hopefully).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.