From 3a684114bbf02f3489289ba488271be83d4c95ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20Falco=CC=81n?= Date: Sat, 17 Jan 2026 19:20:23 +0100 Subject: [PATCH] test: Optimize tests performance --- tests/Feature/AccountControllerTest.php | 3 --- tests/Feature/BulkUpdateTransactionsTest.php | 3 --- tests/Feature/CashflowAnalyticsTest.php | 3 --- tests/Feature/DashboardAnalyticsTest.php | 3 --- tests/Feature/DeleteUserCommandTest.php | 3 --- tests/Feature/IdorVulnerabilityTest.php | 3 --- 6 files changed, 18 deletions(-) diff --git a/tests/Feature/AccountControllerTest.php b/tests/Feature/AccountControllerTest.php index 25f42e1d..98fb1cad 100644 --- a/tests/Feature/AccountControllerTest.php +++ b/tests/Feature/AccountControllerTest.php @@ -6,9 +6,6 @@ use App\Models\AccountBalance; use App\Models\Bank; use App\Models\Category; use App\Models\User; -use Illuminate\Foundation\Testing\RefreshDatabase; - -uses(RefreshDatabase::class); beforeEach(function () { $this->user = User::factory()->onboarded()->create(); diff --git a/tests/Feature/BulkUpdateTransactionsTest.php b/tests/Feature/BulkUpdateTransactionsTest.php index 2549522b..d76f90b7 100644 --- a/tests/Feature/BulkUpdateTransactionsTest.php +++ b/tests/Feature/BulkUpdateTransactionsTest.php @@ -5,9 +5,6 @@ use App\Models\Category; use App\Models\Label; use App\Models\Transaction; use App\Models\User; -use Illuminate\Foundation\Testing\RefreshDatabase; - -uses(RefreshDatabase::class); beforeEach(function () { $this->user = User::factory()->create([ diff --git a/tests/Feature/CashflowAnalyticsTest.php b/tests/Feature/CashflowAnalyticsTest.php index 84023c31..2dec35bb 100644 --- a/tests/Feature/CashflowAnalyticsTest.php +++ b/tests/Feature/CashflowAnalyticsTest.php @@ -5,9 +5,6 @@ use App\Models\Account; use App\Models\Category; use App\Models\Transaction; use App\Models\User; -use Illuminate\Foundation\Testing\RefreshDatabase; - -uses(RefreshDatabase::class); beforeEach(function () { $this->user = User::factory()->create(); diff --git a/tests/Feature/DashboardAnalyticsTest.php b/tests/Feature/DashboardAnalyticsTest.php index a59b380b..108d72f7 100644 --- a/tests/Feature/DashboardAnalyticsTest.php +++ b/tests/Feature/DashboardAnalyticsTest.php @@ -7,9 +7,6 @@ use App\Models\AccountBalance; use App\Models\Category; use App\Models\Transaction; use App\Models\User; -use Illuminate\Foundation\Testing\RefreshDatabase; - -uses(RefreshDatabase::class); beforeEach(function () { $this->user = User::factory()->create(); diff --git a/tests/Feature/DeleteUserCommandTest.php b/tests/Feature/DeleteUserCommandTest.php index 89eb58e3..411b8fae 100644 --- a/tests/Feature/DeleteUserCommandTest.php +++ b/tests/Feature/DeleteUserCommandTest.php @@ -10,11 +10,8 @@ use App\Models\Label; use App\Models\Transaction; use App\Models\User; use App\Models\UserMailLog; -use Illuminate\Foundation\Testing\RefreshDatabase; use Laravel\Cashier\Subscription; -uses(RefreshDatabase::class); - test('deletes user and all associated data when confirmed', function () { $user = User::factory()->onboarded()->create([ 'email' => 'test@example.com', diff --git a/tests/Feature/IdorVulnerabilityTest.php b/tests/Feature/IdorVulnerabilityTest.php index 4aff8f49..b183e544 100644 --- a/tests/Feature/IdorVulnerabilityTest.php +++ b/tests/Feature/IdorVulnerabilityTest.php @@ -8,12 +8,9 @@ use App\Models\Category; use App\Models\Label; use App\Models\Transaction; use App\Models\User; -use Illuminate\Foundation\Testing\RefreshDatabase; use function Pest\Laravel\actingAs; -uses(RefreshDatabase::class); - describe('Account Balance IDOR Protection', function () { it('cannot update current balance for another user account via direct manipulation', function () { $attacker = User::factory()->create();