`RefreshDatabase` drops all tables `RefreshDatabase` drops all tables database database

`RefreshDatabase` drops all tables


If you don't want to wipe and rebuild the database with RefreshDatabase, you can simply use the DatabaseTransactions trait. This will roll back any changes made during testing.

<?phpnamespace Tests\Unit;use Tests\TestCase;use Illuminate\Foundation\Testing\WithoutMiddleware;use Illuminate\Foundation\Testing\DatabaseTransactions;class ExampleTest extends TestCase{    use DatabaseTransactions;    /**     * A basic test example.     *     * @return void     */    public function testBasicTest()    {        $this->assertTrue(true);    }}


Update your phpunit.xml and add these 2 lines

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