protected function defineFunction($namespace, $functionName) { $mock = new Spy($namespace, $functionName, function () { }); $mock->define(); }