toBeTruthy(); }); it('returns true when both from and to are null (unbounded interval)', function (): void { // GIVEN $now = Date::create(2025, 12, 25, 12, 0, 0); // WHEN Date::setTestNow($now); $result = DatesHelper::isIn(null, null); // THEN expect($result)->toBeTrue(); }); it('returns true when only from is set and now is after from', function (): void { // GIVEN $now = Date::create(2025, 12, 25, 12, 0, 0); $from = Date::createFromDate(2025, 12, 24); // WHEN Date::setTestNow($now); $result = DatesHelper::isIn($from, null); // THEN expect($result)->toBeTrue(); }); it('returns false when only from is set and now is before from', function (): void { // GIVEN $now = Date::create(2025, 12, 25, 12, 0, 0); $from = Date::createFromDate(2025, 12, 26); // WHEN Date::setTestNow($now); $result = DatesHelper::isIn($from, null); // THEN expect($result)->toBeFalse(); }); it('returns true when only to is set and now is before to', function (): void { // GIVEN $now = Date::create(2025, 12, 25, 12, 0, 0); $to = Date::createFromDate(2025, 12, 26); // WHEN Date::setTestNow($now); $result = DatesHelper::isIn(null, $to); // THEN expect($result)->toBeTrue(); }); it('returns false when only to is set and now is after to', function (): void { // GIVEN $now = Date::create(2025, 12, 25, 12, 0, 0); $to = Date::createFromDate(2025, 12, 24); // WHEN Date::setTestNow($now); $result = DatesHelper::isIn(null, $to); // THEN expect($result)->toBeFalse(); }); });