예제 #1
0
 /** @test */
 public function excludeEndDate()
 {
     $range = new DateRange([$this->start, $this->end]);
     $range->excludeEndDate();
     $this->assertFalse($range->contains('2015-12-31'));
     $this->assertTrue($range->contains('2015-12-30'));
     $last = null;
     // dirty test..  (check the last value only)
     foreach ($range as $d) {
         $last = $d;
     }
     $this->assertEquals(new DateTime('2015-12-30'), $last);
 }