public function testTimeStringToSeconds() { $this->assertEquals(0, StringUtils::timeStringToSeconds('0:00:00')); $this->assertEquals(0, StringUtils::timeStringToSeconds('00:00')); $this->assertEquals(5, StringUtils::timeStringToSeconds('0:00:05')); $this->assertEquals(936, StringUtils::timeStringToSeconds('0:15:36')); $this->assertEquals(936, StringUtils::timeStringToSeconds('15:36')); $this->assertEquals(53663, StringUtils::timeStringToSeconds('14:54:23')); $this->assertEquals(-5, StringUtils::timeStringToSeconds('-0:00:05')); $this->assertEquals(-936, StringUtils::timeStringToSeconds('-0:15:36')); $this->assertEquals(-936, StringUtils::timeStringToSeconds('-15:36')); $this->assertEquals(-53663, StringUtils::timeStringToSeconds('-14:54:23')); }