Example #1
0
 /**
  * @covers Time_DateTime::between
  */
 public function testBetween()
 {
     $from = new Time_DateTime();
     $from->sub(new DateInterval('P1D'));
     $to = new Time_DateTime();
     $to->add(new DateInterval('P1D'));
     $this->assertTrue($this->object->between($from, $to));
     $from->add(new DateInterval('P1D'));
     $this->assertTrue($this->object->between($from, $to));
     $from->add(new DateInterval('P1D'));
     $this->assertFalse($this->object->between($from, $to));
 }