ldc-boutique-cnc-sable/tests/Integration/WithApp/Helpers/DateHelperTest.php

23 lines
550 B
PHP
Raw Normal View History

2026-06-14 21:32:07 +02:00
<?php
declare(strict_types=1);
use Illuminate\Support\Facades\Date;
use Shared\Helpers\DatesHelper;
describe('Date Helper', function (): void {
it('can verify a date is in between', function (): void {
// GIVEN
$now = Date::create(2025, 12, 25, 12, 0, 0);
$from = Date::createFromDate(2025, 12, 24);
$to = Date::createFromDate(2025, 12, 26);
// WHEN
Date::setTestNow($now);
$result = DatesHelper::isIn($from, $to);
// THEN
expect($result)->toBeTruthy();
});
});