22 lines
560 B
PHP
22 lines
560 B
PHP
<?php
|
|
|
|
namespace Slovocast\Tests\Domain\Entity;
|
|
use Slovocast\Domain\Entity\Episode;
|
|
use Slovocast\Tests\TestCase;
|
|
|
|
class EpisodeTest extends TestCase
|
|
{
|
|
public function testDurationParsing(): void
|
|
{
|
|
$oneHourThirtyMinutes = 5400;
|
|
$fortyNineMinutesEightSeconds = 2948;
|
|
$fourMinutesTwentySeconds = 260;
|
|
$sixMinutesNineSeconds = 369;
|
|
$twentyThreeHoursFortyThreeMinutesTwelveSeconds = 85392;
|
|
|
|
$r = Episode::parseDurationFromLength($oneHourThirtyMinutes);
|
|
$this->assertEquals("01:30:00", $r);
|
|
}
|
|
|
|
}
|