public static function restoreFunction($func)
{
if (isset(self::$internal_func_mocks[$func])) {
if (!self::$rewrite_internal) {
throw new \RuntimeException("Function {$func} is mocked internally, cannot unmock");
}
self::$func_mocks[$func] = self::$internal_func_mocks[$func];
return;
}
unset(self::$func_mocks[$func]);
}