title: factory not being found in PHP Feature Test Laravel-8
body: <p>Just playing around with laravel-8 unit tests. I extended the basic TestCase and thought laravels factory method would be available. I checked the composer.json and the factories are being loaded.</p>
  <p>I am trying to run this particular test but <code>factory</code> is not found any ideas:</p>
  <pre><code>&lt;?php
  
  namespace Tests\Feature\Http\Controllers\Auth;
  
  use Illuminate\Foundation\Testing\RefreshDatabase;
  use Illuminate\Foundation\Testing\WithFaker;
  use Tests\TestCase;
  use App\User;
  
  class LoginControllerTest extends TestCase
  {
      use RefreshDatabase;
      /** @test */
      public function login_authenticates_and_redirects_user()
      {
          $user = factory(User::class)-&gt;create();
  
          $response = $this-&gt;post(route('login'), [
              'email' =&gt; $user-&gt;email,
              'password' =&gt; 'password'
          ]);
  
          $response-&gt;assertRedirect(route('home'));
          $this-&gt;assertAuthenticatedAs($user);
      }
  }
  </code></pre>
  <p>The error I am getting is:</p>
  <pre><code>1) Tests\Feature\Http\Controllers\Auth\LoginControllerTest::login_authenticates_and_redirects_user
  Error: Call to undefined function Tests\Feature\Http\Controllers\Auth\factory()
  </code></pre>