generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor tests to use RefreshDatabase trait
Removed manual migration calls in test setup and teardown in favor of using the RefreshDatabase trait to ensure a consistent state. Corrected a typo in migration file name within the service provider.
- Loading branch information
1 parent
73cf9c8
commit 55ac483
Showing
3 changed files
with
5 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
<?php | ||
|
||
use Illuminate\Foundation\Testing\RefreshDatabase; | ||
use Illuminate\Support\Facades\Artisan; | ||
use Illuminate\Support\Facades\Schema; | ||
use Step2Dev\LazySetting\Tests\TestCase; | ||
|
||
uses(TestCase::class)->in(__DIR__); | ||
|
||
beforeEach(function () { | ||
Artisan::call('migrate'); | ||
}); | ||
|
||
afterEach(function () { | ||
Artisan::call('migrate:reset'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters