/**
* Sets the stub logic.
*
* @param mixed $substitute The logic.
*/
public function toBeOK()
{
if (!is_string($this->_actual)) {
throw new Exception("Error `toBeOK()` need to be applied on a fully-namespaced class or function name.");
}
if ($this->_isClass) {
Monkey::patch($this->_actual, Double::classname());
} else {
Monkey::patch($this->_actual, function () {
});
}
}