From 4165bfecb5268a546c165e568988f0affe2425e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Sat, 3 Oct 2026 11:30:44 +0200 Subject: [PATCH] fix(tests): use valid UUID v7 for order references in integration tests --- .../Adapters/Repositories/EloquentOrderRepositoryTest.php | 2 +- .../Services/EloquentEmployeeStatisticsServiceTest.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Integration/WithApp/Infra/Adapters/Repositories/EloquentOrderRepositoryTest.php b/tests/Integration/WithApp/Infra/Adapters/Repositories/EloquentOrderRepositoryTest.php index 9bbec2a6..d6c22341 100644 --- a/tests/Integration/WithApp/Infra/Adapters/Repositories/EloquentOrderRepositoryTest.php +++ b/tests/Integration/WithApp/Infra/Adapters/Repositories/EloquentOrderRepositoryTest.php @@ -69,7 +69,7 @@ it('updates an existing order in the repository', function () { DB::table('orders')->insert([ 'id' => '018e4567-e89b-72d3-a456-426614174002', 'shop_id' => $shopId, - 'reference' => '1Bs1tsocVs3qFN46D7MYmq', + 'reference' => Uuid::uuid7()->toString(), 'employee' => json_encode([ 'matricule' => '1234567', 'firstname' => 'Jean', diff --git a/tests/Integration/WithApp/Infra/Adapters/Services/EloquentEmployeeStatisticsServiceTest.php b/tests/Integration/WithApp/Infra/Adapters/Services/EloquentEmployeeStatisticsServiceTest.php index d62a7895..88483682 100644 --- a/tests/Integration/WithApp/Infra/Adapters/Services/EloquentEmployeeStatisticsServiceTest.php +++ b/tests/Integration/WithApp/Infra/Adapters/Services/EloquentEmployeeStatisticsServiceTest.php @@ -9,6 +9,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; use Infrastructure\Adapters\Services\EloquentEmployeeStatisticsService; +use Ramsey\Uuid\Uuid; beforeEach(function () { if (! Schema::hasTable('orders')) { @@ -36,7 +37,7 @@ it('retrieves the weekly order total for a given employee', function () { DB::table('orders')->insert([ 'id' => '018e4567-e89b-72d3-a456-426614174000', 'shop_id' => 1, - 'reference' => '1Bs1tsocVs3qFN46D7MYmq', + 'reference' => Uuid::uuid7()->toString(), 'employee' => json_encode([ 'matricule' => '1234567', 'firstname' => 'Jean',