I am totally bamboozed with this. Did you work out where the phpunit gets its baseUrl.
I have set it in the testcase - but it seems to be ignored or cached or something.
I did, but I can't remember dude. What I can tell you is that I moved away from PHPUnit and onto Codeception. For me the integration was far easier and seems like a cleaner implementation.