Esempio n. 1
0
 /**
  *
  */
 public function getDummyBody()
 {
     $dummyElector = new Elector();
     $dummyElector->setFirstName('Kasper');
     $dummyElector->setLastName('Skårhøj');
     $dummyElector->setGender(Elector::GENDER_MALE);
     $dummyElector->setEmail('*****@*****.**');
     $dummyElectionInvitation = new ElectionInvitation();
     $dummyElectionInvitation->setElector($dummyElector);
     $dummyElectionInvitation->_setProperty('uid', -1);
     $dummyElectionInvitation->setSecret('foooBAAAAArrrrr');
     return $this->getRenderedBody(GeneralUtility::makeInstance(ObjectManager::class)->get(ConfigurationRepository::class)->findCurrent(), $dummyElectionInvitation);
 }
 /**
  * @param ElectionCircular $electionCircular
  * @param string $email
  */
 public function testSendAction(ElectionCircular $electionCircular, $email)
 {
     $elector = new Elector();
     $elector->setFirstName('[FIRST NAME]');
     $elector->setMiddleName('[MIDDLE NAME]');
     $elector->setLastName('[LAST NAME]');
     $elector->setEmail($email);
     $elector->setGender(rand(1, 2));
     $this->objectManager->get(MailUtility::class)->sendElectionCircularToElector($electionCircular, $elector, $this->configuration);
     $this->redirect(self::ACTION_PREVIEW, self::CONTROLLER_NAME, 'election', ['electionCircular' => $electionCircular]);
 }