From 018eca597f543590706f6de5ccdf5dd4bf4a2bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Thu, 30 Sep 2021 01:23:20 +0300 Subject: [PATCH] user refresh db trait --- tests/TestCase.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 7e06fd16e..2d03f180e 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -3,20 +3,17 @@ namespace Tests; use App\Traits\Jobs; -use Illuminate\Support\Facades\Queue; -use Illuminate\Foundation\Testing\DatabaseMigrations; -use Illuminate\Foundation\Testing\DatabaseTransactions; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; -use Illuminate\Support\Facades\Artisan; abstract class TestCase extends BaseTestCase { - use CreatesApplication, DatabaseMigrations, Jobs; + use CreatesApplication, Jobs, RefreshDatabase; protected function setUp(): void { parent::setUp(); - Artisan::call('db:seed', ['--class' => '\Database\Seeds\TestCompany', '--force' => true]); + $this->artisan('db:seed', ['--class' => '\Database\Seeds\TestCompany', '--force' => true]); } }