public function it_can_remove_all_user_from_day(User $user, User $user2, Day $day, HistoryService $historyService)
 {
     MockDay::Day($day, 'now');
     MockUser::User($user, 'testuser1');
     MockUser::User($user2, 'testuser2');
     $day->removeUser(Argument::any())->shouldBeCalled();
     $user->removeDay(Argument::any())->shouldBeCalled();
     $user2->removeDay(Argument::any())->shouldBeCalled();
     $user->getHistoryService()->willReturn($historyService);
     $user2->getHistoryService()->willReturn($historyService);
     $day->getTaUsers()->shouldBeCalled()->willReturn([$user, $user2]);
     $this->removeAllUserFromDay($day);
 }
 public function it_can_analyzing_caching(Day $day1, Day $day2, Day $day3)
 {
     MockDay::Day($day1, '-2 Day', true);
     MockDay::Day($day2, '+5 Day', true);
     MockDay::Day($day3, '-5 Day', true);
     $this->getNumberPastDates()->shouldReturn(0);
     $this->getNumberforwardDates()->shouldReturn(0);
     $this->addDate($day1);
     $this->addDate($day3);
     $this->getNumberPastDates()->shouldReturn(2);
     $this->addDate($day2);
     $this->addDate(clone $day2);
     $this->getNumberforwardDates()->shouldReturn(1);
     $this->removeDate($day1);
     $this->removeDate(clone $day1);
     $this->getNumberPastDates()->shouldReturn(1);
     $this->getNumberforwardDates()->shouldReturn(1);
 }