Skip to content

Instantly share code, notes, and snippets.

View robertogallea's full-sized avatar

Roberto Gallea robertogallea

View GitHub Profile
@robertogallea
robertogallea / EmptiesDatabase.php
Created January 14, 2020 06:58
RefreshDatabase testing trait which just truncates data (doesn't drop table), improving test speed.
<?php
namespace Test;
use Illuminate\Foundation\Testing\RefreshDatabase;
trait EmptiesDatabase
{
use RefreshDatabase {
RefreshDatabase::refreshTestDatabase as parentRefreshTestDatabase;