Работа над журналом для ст. мед сестер
This commit is contained in:
15
tests/Unit/DateRangeServiceTest.php
Normal file
15
tests/Unit/DateRangeServiceTest.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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');
|
||||
});
|
||||
Reference in New Issue
Block a user