If you create a Spy without a mock function, it will use the existing
function.
Example:
namespace foo;
use phpmock\spy\Spy;
function bar($min, $max) {
return rand($min, $max) + 3;
}
$spy = new Spy(__NAMESPACE__, "rand");
$spy->enable();
$result = bar(1, 2);
assert ([1, 2] == $spy->getInvocations()[0]->getArguments());
assert ($result == $spy->getInvocations()[0]->getReturn() + 3);