public function testFormat_seconds() { $this->assertEquals('07:38', p4string::format_seconds(458)); $this->assertEquals('15:46:31', p4string::format_seconds(56791)); $this->assertEquals('2737:59:51', p4string::format_seconds(9856791)); $this->assertEquals('00:00', p4string::format_seconds(0)); $this->assertEquals('', p4string::format_seconds(-15)); }
/** * * @return string */ public function get_duration() { return p4string::format_seconds($this->entry->getVideoDuration()); }
public function testGet_duration() { $this->assertEquals(p4string::format_seconds(80), $this->object->get_duration()); $this->assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_STRING, $this->object->get_duration()); }
/** * get duration formatted as xx:xx:xx * * @return string */ public function get_formated_duration() { return p4string::format_seconds($this->get_duration()); }
/** * * @return string */ public function get_duration() { return p4string::format_seconds((int) $this->get('duration', '0')); }