buildDefaultTime() public static method

Return strings like 2:33:99 from seconds etc
public static buildDefaultTime ( integer $duration ) : string
$duration integer Duration in seconds
return string Time
Example #1
0
 /**
  * TimeTest::testBuildDefaultTime()
  *
  * @return void
  */
 public function testBuildDefaultTime()
 {
     //echo $this->_header(__FUNCTION__);
     $tests = [7440 => '02:04:00', 7220 => '02:00:20', 5400 => '01:30:00', 3660 => '01:01:00', 1 * HOUR + 2 * MINUTE + 4 * SECOND => '01:02:04'];
     foreach ($tests as $was => $expected) {
         $is = $this->Time->buildDefaultTime($was);
         //pr($is);
         $this->assertEquals($expected, $is);
     }
 }