Exemplo n.º 1
0
 /**
  * @ZF-8650
  */
 public function testFractionalPrecision()
 {
     $date = new Date();
     $date->set('012345', Date::MILLISECOND);
     $this->assertEquals(3, $date->getFractionalPrecision());
     $this->assertEquals('345', $date->toString('S'));
     $date->setFractionalPrecision(6);
     $this->assertEquals(6, $date->getFractionalPrecision());
     $this->assertEquals('345000', $date->toString('S'));
     $date->add(200, Date::MILLISECOND);
     $this->assertEquals(6, $date->getFractionalPrecision());
     $this->assertEquals('345200', $date->toString('S'));
 }