/**
  * action createParticipant
  *
  * @param Reservation $reservation
  * @param Person $newParticipant
  * @return void
  */
 public function createParticipantAction(Reservation $reservation, Person $newParticipant)
 {
     if (!$reservation->getStatus() == Reservation::STATUS_DRAFT) {
         $reservation->setStatus(Reservation::STATUS_DRAFT);
     }
     $newParticipant->setType(Person::PERSON_TYPE_PARTICIPANT);
     $reservation->getLesson()->addParticipant($newParticipant);
     $reservation->addParticipant($newParticipant);
     $this->reservationRepository->update($reservation);
     $this->persistenceManager->persistAll();
     $this->addFlashMessage($this->translate('message.reservation.createParticipant.success'));
     $this->redirect('edit', null, null, ['reservation' => $reservation]);
 }
 /**
  * @test
  */
 public function getStatusReturnsInitialValueForInteger()
 {
     $this->assertSame(0, $this->subject->getStatus());
 }