Ejemplo n.º 1
0
 function it_can_tell_the_end_date()
 {
     $this->beConstructedWith(Month::fromName('June'), Year::fromNumber(2014));
     $date = $this->getEndDate();
     $date->getDay()->shouldReturn(30);
     $date->getPeriod()->shouldReturn($this);
 }
Ejemplo n.º 2
0
 function it_can_forward_to_the_closest_specified_weekday()
 {
     $this->beConstructedWith(16, new Period(Month::fromName('April'), Year::fromNumber(2013)));
     $this->nextWeekday(Date::WEDNESDAY)->getDay()->shouldReturn(17);
     $this->nextWeekday(Date::MONDAY)->getDay()->shouldReturn(22);
     $this->nextWeekday(Date::TUESDAY)->getDay()->shouldReturn(16);
 }