private function assertUpdatesSeriesParticipation($invitationAction, $seriesMethod)
 {
     $this->fakeConfig->SetSectionKey(ConfigSection::RESERVATION, ConfigKeys::RESERVATION_START_TIME_CONSTRAINT, ReservationStartTimeConstraint::NONE);
     $currentUserId = 1029;
     $referenceNumber = 'abc123';
     $series = $this->getMock('ExistingReservationSeries');
     $series->expects($this->any())->method('GetAllowParticipation')->will($this->returnValue(true));
     $series->expects($this->any())->method('AllResources')->will($this->returnValue(array()));
     $this->page->expects($this->once())->method('GetResponseType')->will($this->returnValue('json'));
     $this->page->expects($this->once())->method('GetInvitationAction')->will($this->returnValue($invitationAction));
     $this->page->expects($this->once())->method('GetInvitationReferenceNumber')->will($this->returnValue($referenceNumber));
     $this->page->expects($this->once())->method('GetUserId')->will($this->returnValue($currentUserId));
     $this->reservationRepo->expects($this->once())->method('LoadByReferenceNumber')->with($this->equalTo($referenceNumber))->will($this->returnValue($series));
     $series->expects($this->once())->method($seriesMethod)->with($this->equalTo($currentUserId));
     $this->reservationRepo->expects($this->once())->method('Update')->with($this->equalTo($series));
     $this->page->expects($this->once())->method('DisplayResult')->with($this->equalTo(null));
     $this->presenter->PageLoad();
 }
Example #2
0
 public function PageLoad()
 {
     $this->presenter->PageLoad();
 }