title: laravel phpunit test with api token authentication
body: <p>How can I add the authorization header in phpunit? I am testing a json api that requires an api_token. laravel docs provide a actingAs method. But this does not work in my case because the api token is not directly related to the users table.</p>
  
  <p>EDIT: </p>
  
  <pre><code>public function test_returns_response_with_valid_request()
      {
          $response = $this-&gt;json('post', '/api/lookup', [
              'email' =&gt; 'user@gmail.com'
          ]);
          $response-&gt;assertStatus(200);
          $response-&gt;assertJsonStructure([
              'info' =&gt; [
                  'name'
              ]
          ]);
      }
  </code></pre>