Test many permutations of the duration parser.
This commit is contained in:
parent
d92fa75229
commit
fe627259db
@ -16,6 +16,17 @@ class EpisodeTest extends TestCase
|
|||||||
|
|
||||||
$r = Episode::parseDurationFromLength($oneHourThirtyMinutes);
|
$r = Episode::parseDurationFromLength($oneHourThirtyMinutes);
|
||||||
$this->assertEquals("01:30:00", $r);
|
$this->assertEquals("01:30:00", $r);
|
||||||
}
|
|
||||||
|
|
||||||
|
$r = Episode::parseDurationFromLength($fortyNineMinutesEightSeconds);
|
||||||
|
$this->assertEquals("49:08", $r);
|
||||||
|
|
||||||
|
$r = Episode::parseDurationFromLength($fourMinutesTwentySeconds);
|
||||||
|
$this->assertEquals("04:20", $r); // nice!
|
||||||
|
|
||||||
|
$r = Episode::parseDurationFromLength($sixMinutesNineSeconds);
|
||||||
|
$this->assertEquals("06:09", $r); // nice!
|
||||||
|
|
||||||
|
$r = Episode::parseDurationFromLength($twentyThreeHoursFortyThreeMinutesTwelveSeconds);
|
||||||
|
$this->assertEquals("23:43:12", $r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user