test(tests): update Carbon usage in GetPickTimeSlotQueryTest and IcsGeneratorServiceTest
Refactor date handling to use CarbonImmutable for consistency in tests.
This commit is contained in:
parent
7698821501
commit
ec6e220138
2 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue