예제 #1
0
 public function testIntervalAndStartAt()
 {
     $expireAt = new \DateTime('2014-01-15');
     $number = 3;
     $unit = ReminderInterval::UNIT_DAY;
     $interval = new ReminderInterval($number, $unit);
     $this->assertNull($this->entity->getStartAt());
     $this->entity->setExpireAt($expireAt);
     $this->entity->setInterval($interval);
     $this->assertAttributeEquals($number, 'intervalNumber', $this->entity);
     $this->assertAttributeEquals($unit, 'intervalUnit', $this->entity);
     $this->assertEquals(new \DateTime('2014-01-12'), $this->entity->getStartAt());
 }