title: Laravel 7: unit test set default request header in setUp()
body: <p>I want to set my headers for all requests in a test in the setUp method instead of doing it to all the tests separately.</p>
  
  <p>Is there an easy way to do this?</p>
  
  <p>So par example:</p>
  
  <pre><code>$this-&gt;withHeaders([
              'Authorization' =&gt; 'Bearer ' . $response['data']['token'],
              'Accept' =&gt; 'application/json'
          ])
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>setUp(){
  $this-&gt;setHeaders([
              'Authorization' =&gt; 'Bearer ' . $response['data']['token'],
              'Accept' =&gt; 'application/json'
          ]);
  }
  </code></pre>