Setup sqlite for testing with laravel

How to start using SQLite for testing with laravel

In phpunit.xml you create 2 new environments after the MAIL_DIVER like this:

<env name="DB_CONNECTION" value="sqlite"/>  
<env name="DB_DATABASE" value=":memory:"/>  

Now to go to your test and add use RefreshDatabase; and importing
use Illuminate\Foundation\Testing\RefreshDatabase;

Now you should run your test and it should work like before.