title: Laravel phpunit how to use diffent migrations for tests
body: <p>I am trying to set up tests in Laravel, but I want to run different migrations from those that usually run.</p>
  
  <p>The migrations that I run to initiate the database imports data from a production environment.<br>
  For testing I want to use a different database called "test", and I want to fill this test database with test data, not production data.</p>
  
  <p>I added a "testing" connection to <code>config/database.php</code> which uses the "test" database:</p>
  
  <pre class="lang-php prettyprint-override"><code>'connections' =&gt; [
  
          'mysql' =&gt; [
              'database' =&gt; env('DB_DATABASE', 'forge'),
              ...
          ],
  
          'testing' =&gt; [
              'database' =&gt; 'test',
              ...
          ],
  ],
  </code></pre>
  
  <p>And I setup <code>phpunit.xml</code> to use this "testing" connection:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;phpunit ...&gt;
      ...
      &lt;php&gt;
          &lt;env name="DB_CONNECTION" value="testing"/&gt;
          ...
      &lt;/php&gt;
  &lt;/phpunit&gt;
  </code></pre>
  
  <p>Now I want to initialize this "test" database with test data, using migrations from a different folder than the default.</p>
  
  <p>I can use the normal migrations like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  namespace Tests;
  
  use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
  use Illuminate\Foundation\Testing\DatabaseMigrations;
  
  abstract class TestCase extends BaseTestCase
  {
      use DatabaseMigrations;
  
      public function setUp(): void
      {
          parent::setUp();
          $this-&gt;seed();
      }
  }
  </code></pre>
  
  <p>But this uses the default folder <code>database/migrations</code>.
  I would like to put the testing migrations in folder <code>tests/database/migrations</code>.</p>
  
  <p>Is there a way to let <code>use DatabaseMigrations;</code> use migrations from another folder?</p>