test(tests): update Carbon usage in GetPickTimeSlotQueryTest and IcsGeneratorServiceTest

Refactor date handling to use CarbonImmutable for consistency in tests.
This commit is contained in:
Jérémy Munsch 2026-11-16 12:54:30 +01:00
parent 7698821501
commit ec6e220138
No known key found for this signature in database
GPG key ID: 2AAECDA6B7330F91
2 changed files with 3 additions and 2 deletions

View file

@ -7,6 +7,7 @@ use App\Cqs\Queries\Orders\GetPickTimeSlotQueryInput;
use App\Cqs\Queries\Orders\GetPickTimeSlotQueryOutput;
use App\Dto\ShopDto;
use App\Services\MapUrlService;
use Carbon\CarbonImmutable;
use Domain\Enums\OrderTunnelStep;
use Domain\Models\Entities\Shop;
use Domain\Models\ValueObjects\Entities\ShopId;
@ -28,7 +29,7 @@ describe('GetPickTimeSlotQuery', function (): void {
postcode: '75001',
city: 'Paris',
);
$slot = new PickupTimeSlot(now(), new \DateInterval('PT1H'));
$slot = new PickupTimeSlot(CarbonImmutable::parse('2026-10-15 10:00:00'), new \DateInterval('PT1H'));
$timeSlots = [$slot];
$orderTunnelService = \Mockery::mock(OrderTunnelService::class);

View file

@ -4,9 +4,9 @@ declare(strict_types=1);
use App\Dto\IcsContentDto;
use App\Services\IcsGeneratorService;
use Carbon\Carbon;
use Carbon\CarbonImmutable;
use Domain\Models\ValueObjects\IcsContent;
use Illuminate\Support\Carbon;
covers(IcsGeneratorService::class);