protected function setUp() { $this->testingFramework = new tx_oelib_testingFramework('tx_seminars'); $this->configuration = new tx_oelib_Configuration(); $this->configuration->setAsString('dateFormatYMD', self::DATE_FORMAT_YMD); $this->configuration->setAsString('dateFormatY', self::DATE_FORMAT_Y); $this->configuration->setAsString('dateFormatM', self::DATE_FORMAT_M); $this->configuration->setAsString('dateFormatMD', self::DATE_FORMAT_MD); $this->configuration->setAsString('dateFormatD', self::DATE_FORMAT_D); tx_oelib_ConfigurationRegistry::getInstance()->set('plugin.tx_seminars', $this->configuration); $this->translator = tx_oelib_TranslatorRegistry::getInstance()->get('seminars'); $this->fixture = new tx_seminars_ViewHelper_DateRange(); }
/** * The constructor. */ public function __construct() { $this->translator = tx_oelib_TranslatorRegistry::getInstance()->get('seminars'); }
/** * @test */ public function createIntroductionForEventWithStartAndEndOnOneDayReturnsTimeFromTo() { $timeFormat = '%H:%M'; $endDate = $GLOBALS['SIM_EXEC_TIME'] + 3600; $eventUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('begin_date' => $GLOBALS['SIM_EXEC_TIME'], 'end_date' => $endDate)); $event = new tx_seminars_seminarchild($eventUid, array('timeFormat' => $timeFormat)); $translator = tx_oelib_TranslatorRegistry::getInstance()->get('seminars'); $timeInsert = strftime($timeFormat, $GLOBALS['SIM_EXEC_TIME']) . ' ' . $translator->translate('email_timeTo') . ' ' . strftime($timeFormat, $endDate); self::assertContains(sprintf($translator->translate('email_timeFrom'), $timeInsert), $this->subject->createIntroduction('%s', $event)); }
/** * @test */ public function notifyAttendeeForFormalSalutationAndGenderFemaleContainsFormalFemaleSalutation() { if (!Tx_Oelib_Model_FrontEndUser::hasGenderField()) { self::markTestSkipped('This test is only applicable if there is a FrontEndUser.gender field.'); } $this->fixture->setConfigurationValue('sendConfirmation', TRUE); tx_oelib_ConfigurationRegistry::get('plugin.tx_seminars')->setAsString('salutation', 'formal'); $registration = $this->createRegistration(); $this->testingFramework->changeRecord('fe_users', $registration->getFrontEndUser()->getUid(), array('email' => '*****@*****.**', 'gender' => 1)); $pi1 = new tx_seminars_FrontEnd_DefaultController(); $pi1->init(); $this->fixture->notifyAttendee($registration, $pi1); self::assertContains(tx_oelib_TranslatorRegistry::getInstance()->get('seminars')->translate('email_hello_formal_1'), $this->mailer->getFirstSentEmail()->getBody()); }
/** * The constructor. */ public function __construct() { $this->configuration = tx_oelib_ConfigurationRegistry::getInstance()->get('plugin.tx_seminars'); $this->translator = tx_oelib_TranslatorRegistry::getInstance()->get('seminars'); }
protected function setUp() { $this->testingFramework = new tx_oelib_testingFramework('tx_seminars'); $this->translator = tx_oelib_TranslatorRegistry::getInstance()->get('seminars'); $this->fixture = new tx_seminars_ViewHelper_Countdown(); }