From b2406eedb0a1018fe98ef33e27ef88c81ee0bf17 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 22 Apr 2025 21:51:06 +0200 Subject: [PATCH] test(setup): add base test case and refresh the DB on each test --- tests/Pest.php | 6 +++++- tests/TestCase.php | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/TestCase.php diff --git a/tests/Pest.php b/tests/Pest.php index 749d93f59..e808ee3ee 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -2,6 +2,9 @@ declare(strict_types=1); +use Illuminate\Foundation\Testing\RefreshDatabase; +use Tests\TestCase; + /* |-------------------------------------------------------------------------- | Test Case @@ -13,7 +16,8 @@ declare(strict_types=1); | */ -// pest()->extend(Tests\TestCase::class)->in('Feature'); +pest()->extend(TestCase::class) + ->use(RefreshDatabase::class); /* |-------------------------------------------------------------------------- diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 000000000..c5195662f --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,9 @@ +