16 lines
454 B
PHP
16 lines
454 B
PHP
<?php
|
|
|
|
use App\Services\DateRangeService;
|
|
|
|
it('parses unix seconds and milliseconds as the same report date', function () {
|
|
$service = app(DateRangeService::class);
|
|
|
|
$seconds = 1777215600;
|
|
$milliseconds = $seconds * 1000;
|
|
|
|
expect($service->parseDate($seconds)->format('Y-m-d H:i:s'))
|
|
->toBe('2026-04-27 00:00:00')
|
|
->and($service->parseDate($milliseconds)->format('Y-m-d H:i:s'))
|
|
->toBe('2026-04-27 00:00:00');
|
|
});
|