Patch function call inside workflow tests

Workflows are run in a sandbox by default and workflow testing is meant to use the WorkflowTestingEnvironment (see this part of the README). Workflows should not have workflow code mocked during testing because it works together to build history (but you can replace activities, the only external thing a workflow calls). What is the use case for replacing this workflow code?