protected function setUp() { $this->testingFramework = new Tx_Oelib_TestingFramework('tx_seminars'); $this->configuration = new Tx_Oelib_Configuration(); $this->configuration->setAsString('timeFormat', self::TIME_FORMAT); Tx_Oelib_ConfigurationRegistry::getInstance()->set('plugin.tx_seminars', $this->configuration); $this->translator = Tx_Oelib_TranslatorRegistry::getInstance()->get('seminars'); $this->translatedHours = ' ' . $this->translator->translate('label_hours'); $this->subject = new tx_seminars_ViewHelper_TimeRange(); }
/** * @test */ public function renderForQueueRegistrationsAllowedForEmailNotContainsRegistrationOnQueue() { $this->configuration->setAsBoolean('showAttendancesOnRegistrationQueueInEmailCsv', TRUE); $this->configuration->setAsBoolean('showAttendancesOnRegistrationQueueInCSV', FALSE); $this->configuration->setAsString('fieldsFromAttendanceForCsv', 'uid'); $this->configuration->setAsString('fieldsFromAttendanceForEmailCsv', 'uid'); $registrationUid = $this->testingFramework->createRecord('tx_seminars_attendances', array('seminar' => $this->eventUid, 'crdate' => $GLOBALS['SIM_EXEC_TIME'], 'user' => $this->testingFramework->createFrontEndUser(), 'registration_queue' => TRUE)); self::assertContains((string) $registrationUid, $this->subject->render()); }
/** * @test */ public function sendRemindersToOrganizersSendsEmailWithCsvFileWithOfFrontEndUserData() { $this->configuration->setAsBoolean('addRegistrationCsvToOrganizerReminderMail', TRUE); $this->configuration->setAsString('fieldsFromFeUserForEmailCsv', 'email'); $eventUid = $this->createSeminarWithOrganizer(array('begin_date' => $GLOBALS['SIM_EXEC_TIME'] + tx_oelib_Time::SECONDS_PER_DAY, 'cancelled' => tx_seminars_seminar::STATUS_CONFIRMED)); $this->testingFramework->createRecord('tx_seminars_attendances', array('title' => 'test registration', 'seminar' => $eventUid, 'user' => $this->testingFramework->createFrontEndUser('', array('email' => '*****@*****.**')))); $this->fixture->sendEventTakesPlaceReminders(); self::assertContains('*****@*****.**', $this->getFirstEmailAttachment()->getBody()); }
protected function setUp() { $this->testingFramework = new Tx_Oelib_TestingFramework('tx_seminars'); $this->subject = new tx_seminars_EmailSalutation(); $configuration = new Tx_Oelib_Configuration(); $configuration->setAsString('salutation', 'formal'); Tx_Oelib_ConfigurationRegistry::getInstance()->set('plugin.tx_seminars', $configuration); $this->extConfBackup = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']; $this->t3VarBackup = $GLOBALS['T3_VAR']['getUserObj']; }
/** * @test */ public function createAndOutputListOfRegistrationsForWebModeNotUsesRegistrationsOnQueueSettingFromEmailConfiguration() { $this->configuration->setAsBoolean('showAttendancesOnRegistrationQueueInEmailCsv', TRUE); $this->configuration->setAsString('fieldsFromAttendanceForEmailCsv', 'uid'); $this->configuration->setAsBoolean('showAttendancesOnRegistrationQueueInCsv', FALSE); $this->configuration->setAsString('fieldsFromAttendanceForCsv', 'uid'); $this->testingFramework->createRecord('tx_seminars_attendances', array('seminar' => $this->eventUid, 'user' => $this->testingFramework->createFrontEndUser())); $queueUid = $this->testingFramework->createRecord('tx_seminars_attendances', array('seminar' => $this->eventUid, 'user' => $this->testingFramework->createFrontEndUser(), 'bank_name' => 'foo bank', 'registration_queue' => 1)); self::assertNotContains((string) $queueUid, $this->fixture->createAndOutputListOfRegistrations($this->eventUid)); }
protected function setUp() { $pluginConfiguration = new Tx_Oelib_Configuration(); $pluginConfiguration->setAsString('dateFormatYMD', '%d.%m.%Y'); $configurationRegistry = Tx_Oelib_ConfigurationRegistry::getInstance(); $configurationRegistry->set('plugin.tx_seminars', $pluginConfiguration); $configurationRegistry->set('config', new Tx_Oelib_Configuration()); $configurationRegistry->set('page.config', new Tx_Oelib_Configuration()); $configurationRegistry->set('plugin.tx_seminars._LOCAL_LANG.default', new Tx_Oelib_Configuration()); tx_oelib_configurationProxy::getInstance('seminars')->setAsBoolean('enableConfigCheck', FALSE); $this->testingFramework = new tx_oelib_testingFramework('tx_seminars'); $this->testingFramework->createFakeFrontEnd(); // just picked some random date (2001-01-01 00:00:00) $this->eventDate = 978303600; $this->mapper = new tx_seminars_Mapper_Event(); $event = $this->mapper->getLoadedTestingModel(array('pid' => 0, 'title' => 'Test event', 'begin_date' => $this->eventDate)); $this->eventId = $event->getUid(); $this->fixture = new tx_seminars_FrontEnd_EventHeadline(array('isStaticTemplateLoaded' => 1, 'templateFile' => 'EXT:seminars/Resources/Private/Templates/FrontEnd/FrontEnd.html'), $GLOBALS['TSFE']->cObj); $this->fixture->injectEventMapper($this->mapper); }
/** * @test */ public function renderSeparatesHeadlineFieldsWithSemicolons() { $this->configuration->setAsString('fieldsFromEventsForCsv', 'description,title'); $this->createEventInFolderAndSetPageUid(); self::assertContains($this->localizeAndRemoveColon('tx_seminars_seminars.description') . ';' . $this->localizeAndRemoveColon('tx_seminars_seminars.title'), $this->subject->render($this->pageUid)); }