Ejemplo n.º 1
0
 public function getWeekSheetDays(\DateTime $date)
 {
     $first_day = DatesTransformer::toMonday($date);
     $last_day = DatesTransformer::toSunday($date);
     return DatesTransformer::getAllDaysBetween($first_day, $last_day);
 }
 /**
  * @test
  */
 public function itBringsAllDaysInAnIntervalIncludingBothThresholds()
 {
     // Arrange
     $start_date = new \DateTime('2013-03-15');
     $end_date = new \DateTime('2013-03-25');
     // Act
     $days = DatesTransformer::getAllDaysBetween($start_date, $end_date);
     // Assert
     $this->assertCount(11, $days);
 }