Ejemplo n.º 1
0
 public function testConvertsBackAndForthMongoDatesWithoutLosingMillisecondPrecision()
 {
     $this->forAll(Generator\choose(0, 1500 * 1000 * 1000))->then(function ($milliseconds) {
         $moment = new Moment($milliseconds);
         $this->assertEquals($moment, MongoDate::toMoment(MongoDate::from($moment)));
     });
 }
Ejemplo n.º 2
0
 private function scheduledAt()
 {
     if ($this->hasBeenScheduled()) {
         return T\MongoDate::toMoment($this->status['scheduled_at']);
     }
 }