コード例 #1
0
ファイル: MailNotifierTest.php プロジェクト: kurtkk/seminars
 /**
  * @test
  */
 public function sendRemindersToOrganizersForCliBackendUserWithLanguageGermanSendsReminderInGerman()
 {
     /** @var tx_seminars_Model_BackEndUser $user */
     $user = tx_oelib_MapperRegistry::get('tx_oelib_Mapper_BackEndUser')->findByCliKey();
     $this->testingFramework->changeRecord('be_users', $user->getUid(), array('lang' => 'de'));
     tx_oelib_MapperRegistry::purgeInstance();
     $this->addSpeaker($this->createSeminarWithOrganizer(array('begin_date' => $GLOBALS['SIM_EXEC_TIME'] + tx_oelib_Time::SECONDS_PER_DAY, 'cancelled' => tx_seminars_seminar::STATUS_PLANNED)));
     $this->fixture->sendCancellationDeadlineReminders();
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('seminars') . 'locallang.xml');
     $GLOBALS['LANG']->lang = 'de';
     $subject = $GLOBALS['LANG']->getLL('email_cancelationDeadlineReminderSubject');
     $subject = str_replace('%event', '', $subject);
     self::assertContains($subject, $this->mailer->getFirstSentEmail()->getSubject());
 }
コード例 #2
0
 /**
  * @test
  */
 public function sendRemindersToOrganizersSendsReminderWithMessageWithEventsBeginDate()
 {
     $this->addSpeaker($this->createSeminarWithOrganizer(array('begin_date' => $GLOBALS['SIM_EXEC_TIME'] + tx_oelib_Time::SECONDS_PER_DAY, 'cancelled' => tx_seminars_seminar::STATUS_PLANNED)));
     $this->fixture->sendCancellationDeadlineReminders();
     self::assertContains(strftime($this->configuration->getAsString('dateFormatYMD'), $GLOBALS['SIM_EXEC_TIME'] + tx_oelib_Time::SECONDS_PER_DAY), $this->mailer->getFirstSentEmail()->getBody());
 }