mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-09 00:32:15 +01:00
Add report exports
This commit is contained in:
committed by
Constantin Graf
parent
7c1fe35754
commit
8712cfb9dc
25
tests/Unit/Service/IntervalServiceTest.php
Normal file
25
tests/Unit/Service/IntervalServiceTest.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Unit\Service;
|
||||
|
||||
use App\Service\IntervalService;
|
||||
use Carbon\CarbonInterval;
|
||||
use Tests\TestCase;
|
||||
|
||||
class IntervalServiceTest extends TestCase
|
||||
{
|
||||
public function test_format_returns_correctly_formatted_interval(): void
|
||||
{
|
||||
// Arrange
|
||||
$intervalService = app(IntervalService::class);
|
||||
$interval = CarbonInterval::seconds(123456789123);
|
||||
|
||||
// Act
|
||||
$result = $intervalService->format($interval);
|
||||
|
||||
// Assert
|
||||
$this->assertEquals('34293552:32:03', $result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user