So have a function that does something like this:
function mymod_init()
{
$ip = '123.123.123.123';
$newPath = mymod_redirect_calculate($ip);
if (!empty($newPath)) drupal_goto($newPath);
}
This completely breaks unit testing. I have tests for the "mymod_redirect_calculate", but if I add the above to my init function as shown, the tests can't run.
From what I have gathered "exit" and "drupal_goto" breaks unit testing.
How do I get around this?