$spy()
Spy like us!
MockBox now supports a $spy( method )
method that allows you to spy on methods with all the call log goodness but without removing all the methods. Every other method remains intact, and the actual spied method remains active. We decorate it to track its calls and return data via the $callLog()
method.
Example of CUT:
Example Test: