title: Laravel PHPunit redirect to localhost
body: <p>I am trying to use actingAs (Laravel 5.8) to login for my test but it doesn't appear to do much as it keeps redirecting me to localhost. No clue where it get's this from as I am not redirecy to localhost anywhere, it should at least redirect to my app url?</p>
  <pre><code> public function testCategoriesIndex()
  {
      $response = $this-&gt;actingAs($this-&gt;superAdminUser)
                          -&gt;withSession(['companyId' =&gt; $this-&gt;testCompany-&gt;id])
                          -&gt;get(url(&quot;/{$this-&gt;routePrefix}/categories{$this-&gt;urlParameters}&quot;));       
  
      dd($response-&gt;content());
      
      $response-&gt;assertStatus(200);
  }
  </code></pre>
  <p>output</p>
  <pre><code>&lt;!DOCTYPE html&gt;\n
  &lt;html&gt;\n
      &lt;head&gt;\n
          &lt;meta charset=&quot;UTF-8&quot; /&gt;\n
          &lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url='http://localhost/login'&quot; /&gt;\n
  \n
          &lt;title&gt;Redirecting to http://localhost/login&lt;/title&gt;\n
      &lt;/head&gt;\n
      &lt;body&gt;\n
          Redirecting to &lt;a href=&quot;http://localhost/login&quot;&gt;http://localhost/login&lt;/a&gt;.\n
      &lt;/body&gt;\n
  &lt;/html&gt;
  </code></pre>
  <p>The docs don't mention anything about any of this stuff either, might as well empty....
  <a href="https://laravel.com/docs/5.8/testing" rel="nofollow noreferrer">https://laravel.com/docs/5.8/testing</a></p>