Esempio n. 1
0
 /**
  * Tests RW_Time::addSeconds()
  */
 public function testAddSeconds()
 {
     $time = new RW_Time(61);
     $this->assertSame(61 + 13, $time->addSeconds(13)->getSeconds());
     $time = new RW_Time('27:3');
     $this->assertSame(27 * 60 + 3 + 13, $time->addSeconds(13)->getSeconds());
     $time = new RW_Time('27:3', 'h:m');
     $this->assertSame(27 * 60 * 60 + 3 * 60 + 13, $time->addSeconds(13)->getSeconds());
     $time = new RW_Time('13:27:3');
     $this->assertSame(13 * 60 * 60 + 27 * 60 + 3 + 13, $time->addSeconds(13)->getSeconds());
 }