title: How to assert unauthenticated?
body: <p>In my controller constructor I have middleware auth. How do I assert that somebody is not authenticated in tests? Right now I'm getting Illuminate\Auth\AuthenticationException and the only way to make test positive is to add</p>
  
  <pre><code>$this-&gt;expectException('Illuminate\Auth\AuthenticationException')
  </code></pre>
  
  <p>in the beginning. I saw solutions like using withoutExceptionHandling() in the beginning of test or using assertUnauthorized() but that doesn't change anything.</p>
  
  <p>Is there a better way?</p>
  
  <p>I'm using Laravel 7.2.2 and PHPUnit 8.5.</p>