/**
  * @param ReservationSeries|ExistingReservationSeries $series
  * @return ReservationRuleResult
  */
 public function Validate($series)
 {
     return parent::Validate($series);
 }
 public function testValidatesEachDateThatAReservationRepeatsOn()
 {
     $start = Date::Parse('2010-01-01');
     $end = Date::Parse('2010-01-02');
     $reservationDates = new DateRange($start, $end);
     $twoRepetitions = new RepeatWeekly(1, $start->AddDays(14), array($start->Weekday()));
     $repeatDates = $twoRepetitions->GetDates($reservationDates);
     $reservation = new TestReservationSeries();
     $reservation->WithResource(new FakeBookableResource(1));
     $reservation->WithDuration($reservationDates);
     $reservation->WithRepeatOptions($twoRepetitions);
     $strategy = $this->getMock('IResourceAvailabilityStrategy');
     $strategy->expects($this->exactly(1 + count($repeatDates)))->method('GetItemsBetween')->with($this->anything(), $this->anything())->will($this->returnValue(array()));
     $rule = new ResourceAvailabilityRule($strategy, 'UTC');
     $result = $rule->Validate($reservation);
 }