title: Set SQLite as database for unit testing in Laravel 5.1
body: <p>I'm trying to set-up unit testing in Laravel 5.1. Following the <a href="http://laravel.com/docs/5.1/testing"><strong>documentation</strong></a> I see this:</p>
  
  <blockquote>
    <p>Laravel is built with testing in mind. In fact, support for testing
    with PHPUnit is included out of the box</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>When running tests, Laravel will automatically set the configuration
    environment to testing. Laravel automatically configures the session
    and cache to the array driver while testing, meaning no session or
    cache data will be persisted while testing.</p>
  </blockquote>
  
  <p>which is awesome. But... <strong>how do I tell Laravel to use SQLite database connection when tests are ran?</strong></p>
  
  <p>Only thing there is in config/database.php is this commented code:</p>
  
  <pre><code>/* We might use this connection for unit tests
  'sqlite' =&gt; [
      'driver'   =&gt; 'sqlite',
      'database' =&gt; storage_path().'/database.sqlite',
      'prefix'   =&gt; '',
  ],
  */
  </code></pre>
  
  <p><em>We might use this</em> :)</p>
  
  <p>Is there a way to set this globally for all test? Do I need to set the connecton in every test case?</p>
  
  <p>Any help appreciated.</p>