title: laravel and phpunit: could not find driver (SQL: PRAGMA foreign_keys = ON;)
body: <p>I have run my laravel app with phpunit.
  Everything is fine until at some point when I run my test again turns out with this error.</p>
  <pre><code>Illuminate\Database\QueryException: could not find driver (SQL: PRAGMA foreign_keys = ON;)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/XQ1V1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XQ1V1.png" alt="enter image description here" /></a></p>
  <pre><code>Caused by
  PDOException: could not find driver
  </code></pre>
  <p>Here's my phpunit.xml file:</p>
  <pre><code>&lt;phpunit xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xsi:noNamespaceSchemaLocation=&quot;./vendor/phpunit/phpunit/phpunit.xsd&quot;
       bootstrap=&quot;vendor/autoload.php&quot;
       colors=&quot;true&quot;&gt;
  &lt;testsuites&gt;
      &lt;testsuite name=&quot;Unit&quot;&gt;
          &lt;directory suffix=&quot;Test.php&quot;&gt;./tests/Unit&lt;/directory&gt;
      &lt;/testsuite&gt;
      &lt;testsuite name=&quot;Feature&quot;&gt;
          &lt;directory suffix=&quot;Test.php&quot;&gt;./tests/Feature&lt;/directory&gt;
      &lt;/testsuite&gt;
  &lt;/testsuites&gt;
  &lt;filter&gt;
      &lt;whitelist processUncoveredFilesFromWhitelist=&quot;true&quot;&gt;
          &lt;directory suffix=&quot;.php&quot;&gt;./app&lt;/directory&gt;
      &lt;/whitelist&gt;
  &lt;/filter&gt;
  &lt;php&gt;
      &lt;server name=&quot;APP_ENV&quot; value=&quot;testing&quot;/&gt;
      &lt;server name=&quot;BCRYPT_ROUNDS&quot; value=&quot;4&quot;/&gt;
      &lt;server name=&quot;CACHE_DRIVER&quot; value=&quot;array&quot;/&gt;
      &lt;server name=&quot;DB_CONNECTION&quot; value=&quot;sqlite&quot;/&gt;
      &lt;server name=&quot;DB_DATABASE&quot; value=&quot;:memory:&quot;/&gt;
      &lt;server name=&quot;MAIL_MAILER&quot; value=&quot;array&quot;/&gt;
      &lt;server name=&quot;QUEUE_CONNECTION&quot; value=&quot;sync&quot;/&gt;
      &lt;server name=&quot;SESSION_DRIVER&quot; value=&quot;array&quot;/&gt;
      &lt;server name=&quot;TELESCOPE_ENABLED&quot; value=&quot;false&quot;/&gt;
  &lt;/php&gt;
  </code></pre>
  
  <pre><code>OS: Windows 10 | php version: PHP 7.4.11 | sqlite version: SQLite version 3.19.1
  </code></pre>
  <p>Does anyone encounter with this error in laravel 6 and phpunit?</p>