How do I set laravel test to go to site name instead of localhost

So shortly after I asked I stumbled on the answer. In

 LaravelTestCase.php 

there is a function called

  baseUrl() 

which sets the url it looks for. Once I changed that it looked in the correct spot. That file was part of the laracast testing that I loaded in.


From Laravel 5.4 the $baseUrl method doesn't seem to work anymore

Also, trying to set the url dinamically with \Config:set('app.url', 'http://dev.myappnamehere') doesn't work either, as it seems that Laravel caches the root url

A way to set a custom root url is:

\URL::forceRootUrl('http://dev.myappnamehere');