示例#1
0
 protected function tearDown()
 {
     $this->testingFramework->cleanUp();
     tx_seminars_registrationmanager::purgeInstance();
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) < 4007000) {
         $GLOBALS['TYPO3_CONF_VARS']['BE'] = $this->backEndConfigurationBackup;
     }
 }
示例#2
0
 /**
  * Returns the Singleton registration manager instance.
  *
  * @return tx_seminars_registrationmanager the Singleton instance
  */
 public function getRegistrationManager()
 {
     return tx_seminars_registrationmanager::getInstance();
 }
示例#3
0
 protected function tearDown()
 {
     $this->testingFramework->cleanUp();
     tx_seminars_registrationmanager::purgeInstance();
     $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'] = $this->extConfBackup;
     $GLOBALS['T3_VAR']['getUserObj'] = $this->t3VarBackup;
 }
示例#4
0
 protected function tearDown()
 {
     $this->testingFramework->cleanUp();
     tx_seminars_registrationmanager::purgeInstance();
 }
 /**
  * Checks whether it is possible at all to register for this seminar,
  * ie. it needs registration at all,
  *     has not been canceled,
  *     has either a date set (registration for events without a date is allowed),
  *     has not begun yet,
  *     the registration deadline is not over yet
  *     and there are still vacancies,
  * and returns a localized error message if registration is not possible.
  *
  * @return string empty string if everything is OK, else a localized
  *                error message
  */
 public function canSomebodyRegisterMessage()
 {
     $message = '';
     $registrationManager = tx_seminars_registrationmanager::getInstance();
     if (!$this->needsRegistration()) {
         $message = $this->translate('message_noRegistrationNecessary');
     } elseif ($this->isCanceled()) {
         $message = $this->translate('message_seminarCancelled');
     } elseif (!$this->hasDate() && !$this->getConfValueBoolean('allowRegistrationForEventsWithoutDate')) {
         $message = $this->translate('message_noDate');
     } elseif ($this->hasDate() && $this->isRegistrationDeadlineOver()) {
         $message = $this->translate('message_seminarRegistrationIsClosed');
     } elseif (!$registrationManager->allowsRegistrationBySeats($this)) {
         $message = $this->translate('message_noVacancies');
     } elseif (!$registrationManager->registrationHasStarted($this)) {
         $message = sprintf($this->translate('message_registrationOpensOn'), $this->getRegistrationBegin());
     }
     return $message;
 }
 /**
  * Purges the current instance so that getInstance will create a new instance.
  *
  * @return void
  */
 public static function purgeInstance()
 {
     self::$instance = NULL;
 }
 /**
  * @test
  */
 public function existsSeminarMessageForExistingUidNotSendsHttpHeader()
 {
     $this->fixture->existsSeminarMessage($this->seminarUid);
     self::assertSame(array(), $this->headerCollector->getAllAddedHeaders());
 }
示例#8
0
 /**
  * Returns the requirements which should be displayed.
  *
  * @return tx_seminars_Bag_Event the requirements still to be displayed,
  *                               might be empty
  */
 private function getRequirements()
 {
     if ($this->limitRequirementsToMissing) {
         $result = tx_seminars_registrationmanager::getInstance()->getMissingRequiredTopics($this->event);
     } else {
         $result = $this->event->getRequirements();
     }
     return $result;
 }