Пример #1
0
 protected function setUp()
 {
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_oelib');
     $this->backEndUserBackup = $GLOBALS['BE_USER'];
     $backEndUser = new t3lib_beUserAuth();
     $backEndUser->user = array('uid' => $this->testingFramework->createBackEndUser());
     $GLOBALS['BE_USER'] = $backEndUser;
     $configurationRegistry = Tx_Oelib_ConfigurationRegistry::getInstance();
     $configurationRegistry->set('config', new Tx_Oelib_Configuration());
     $configurationRegistry->set('page.config', new Tx_Oelib_Configuration());
     $configurationRegistry->set('plugin.tx_oelib._LOCAL_LANG', new Tx_Oelib_Configuration());
     $configurationRegistry->set('plugin.tx_oelib._LOCAL_LANG.default', new Tx_Oelib_Configuration());
     $configurationRegistry->set('plugin.tx_oelib._LOCAL_LANG.de', new Tx_Oelib_Configuration());
     $configurationRegistry->set('plugin.tx_oelib._LOCAL_LANG.fr', new Tx_Oelib_Configuration());
 }
Пример #2
0
 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();
 }
Пример #3
0
 /**
  * Creates a front-end user which has a group with the publish setting
  * tx_seminars_Model_FrontEndUserGroup::PUBLISH_HIDE_EDITED and a reviewer.
  *
  * @return void
  */
 private function createAndLoginUserWithReviewer()
 {
     $backendUserUid = $this->testingFramework->createBackEndUser(array('email' => '*****@*****.**', 'realName' => 'Mr. Foo'));
     $userGroupUid = $this->testingFramework->createFrontEndUserGroup(array('tx_seminars_publish_events' => tx_seminars_Model_FrontEndUserGroup::PUBLISH_HIDE_EDITED, 'tx_seminars_reviewer' => $backendUserUid));
     $this->testingFramework->createAndLoginFrontEndUser($userGroupUid, array('name' => 'Mr. Bar', 'email' => '*****@*****.**'));
 }
Пример #4
0
 /**
  * @test
  */
 public function createBackEndUserWithNonZeroUidProvidedInRecordDataThrowsExeption()
 {
     $this->setExpectedException('InvalidArgumentException', 'The column "uid" must not be set in $recordData.');
     $this->subject->createBackEndUser(array('uid' => 999999));
 }