コード例 #1
0
ファイル: EventListViewTest.php プロジェクト: kurtkk/seminars
 protected function setUp()
 {
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('seminars') . 'locallang_db.xml');
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('lang') . 'locallang_general.xml');
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_seminars');
     $configurationRegistry = Tx_Oelib_ConfigurationRegistry::getInstance();
     $configurationRegistry->set('plugin', new Tx_Oelib_Configuration());
     $this->configuration = new Tx_Oelib_Configuration();
     $this->configuration->setData(array('charsetForCsv' => 'utf-8'));
     $configurationRegistry->set('plugin.tx_seminars', $this->configuration);
     $this->subject = new Tx_Seminars_Csv_EventListView();
 }
コード例 #2
0
 protected function setUp()
 {
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('seminars') . 'locallang_db.xml');
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('lang') . 'locallang_general.xml');
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_seminars');
     $configurationRegistry = Tx_Oelib_ConfigurationRegistry::getInstance();
     $configurationRegistry->set('plugin', new Tx_Oelib_Configuration());
     $this->configuration = new Tx_Oelib_Configuration();
     $this->configuration->setData(array('charsetForCsv' => 'utf-8'));
     $configurationRegistry->set('plugin.tx_seminars', $this->configuration);
     $this->pageUid = $this->testingFramework->createSystemFolder();
     $this->eventUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('pid' => $this->pageUid, 'begin_date' => $GLOBALS['SIM_EXEC_TIME']));
     $this->subject = new Tx_Seminars_Csv_EmailRegistrationListView();
     $this->subject->setEventUid($this->eventUid);
 }
コード例 #3
0
ファイル: MailNotifierTest.php プロジェクト: kurtkk/seminars
 protected function setUp()
 {
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_seminars');
     /** @var Tx_Oelib_MailerFactory $mailerFactory */
     $mailerFactory = t3lib_div::makeInstance('Tx_Oelib_MailerFactory');
     $mailerFactory->enableTestMode();
     $this->mailer = $mailerFactory->getMailer();
     define('TYPO3_cliKey', 'seminars');
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][TYPO3_cliKey][1] = '_cli_seminars_test';
     $this->testingFramework->createBackEndUser(array('username' => '_cli_seminars_test'));
     tx_oelib_ConfigurationRegistry::getInstance()->set('plugin', new Tx_Oelib_Configuration());
     $this->configuration = new Tx_Oelib_Configuration();
     $this->configuration->setData(array('sendEventTakesPlaceReminderDaysBeforeBeginDate' => 2, 'sendCancelationDeadlineReminder' => TRUE, 'filenameForRegistrationsCsv' => 'registrations.csv', 'dateFormatYMD' => '%d.%m.%Y', 'fieldsFromAttendanceForEmailCsv' => 'title', 'showAttendancesOnRegistrationQueueInEmailCsv' => TRUE));
     tx_oelib_ConfigurationRegistry::getInstance()->set('plugin.tx_seminars', $this->configuration);
     $this->fixture = new tx_seminars_cli_MailNotifier();
 }
コード例 #4
0
ファイル: pi2Test.php プロジェクト: Konafets/seminars
 protected function setUp()
 {
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) < 4007000) {
         $this->backEndConfigurationBackup = $GLOBALS['TYPO3_CONF_VARS']['BE'];
         $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] = 'utf-8';
     }
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('seminars') . 'locallang_db.xml');
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('lang') . 'locallang_general.xml');
     tx_oelib_headerProxyFactory::getInstance()->enableTestMode();
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_seminars');
     $this->pid = $this->testingFramework->createSystemFolder();
     $this->eventUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('pid' => $this->pid, 'begin_date' => $GLOBALS['SIM_EXEC_TIME']));
     $configurationRegistry = Tx_Oelib_ConfigurationRegistry::getInstance();
     $configurationRegistry->set('plugin', new Tx_Oelib_Configuration());
     $this->configuration = new Tx_Oelib_Configuration();
     $this->configuration->setData(array('charsetForCsv' => 'utf-8'));
     $configurationRegistry->set('plugin.tx_seminars', $this->configuration);
     $this->fixture = new tx_seminars_pi2();
     $this->fixture->init(array());
 }
コード例 #5
0
 protected function setUp()
 {
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('seminars') . 'locallang_db.xml');
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('lang') . 'locallang_general.xml');
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_seminars');
     $configurationRegistry = Tx_Oelib_ConfigurationRegistry::getInstance();
     $configurationRegistry->set('plugin', new Tx_Oelib_Configuration());
     $this->configuration = new Tx_Oelib_Configuration();
     $this->configuration->setData(array('charsetForCsv' => 'utf-8'));
     $configurationRegistry->set('plugin.tx_seminars', $this->configuration);
     $this->pageUid = $this->testingFramework->createSystemFolder();
     $this->eventUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('pid' => $this->pageUid, 'begin_date' => $GLOBALS['SIM_EXEC_TIME']));
     $this->subject = $this->getMockForAbstractClass('Tx_Seminars_Csv_AbstractRegistrationListView');
     $this->subject->expects(self::any())->method('shouldAlsoContainRegistrationsOnQueue')->will(self::returnValue(TRUE));
     $testCase = $this;
     $this->subject->expects(self::any())->method('getFrontEndUserFieldKeys')->will(self::returnCallback(function () use($testCase) {
         return $testCase->frontEndUserFieldKeys;
     }));
     $this->subject->expects(self::any())->method('getRegistrationFieldKeys')->will(self::returnCallback(function () use($testCase) {
         return $testCase->registrationFieldKeys;
     }));
     $this->subject->setEventUid($this->eventUid);
 }