protected function setUp() { $this->testingFramework = new tx_oelib_testingFramework('tx_seminars'); $frontEndPageUid = $this->testingFramework->createFrontEndPage(); $this->testingFramework->createFakeFrontEnd($frontEndPageUid); $this->session = new tx_oelib_FakeSession(); tx_oelib_Session::setInstance(tx_oelib_Session::TYPE_USER, $this->session); $configurationRegistry = tx_oelib_ConfigurationRegistry::getInstance(); $configuration = new tx_oelib_Configuration(); $configuration->setAsString('currency', 'EUR'); $configurationRegistry->set('plugin.tx_seminars', $configuration); $configurationRegistry->set('plugin.tx_staticinfotables_pi1', new tx_oelib_Configuration()); $this->seminar = new tx_seminars_seminar($this->testingFramework->createRecord('tx_seminars_seminars', array('payment_methods' => '1'))); $this->seminarUid = $this->seminar->getUid(); $this->fixture = new tx_seminars_FrontEnd_RegistrationForm(array('pageToShowAfterUnregistrationPID' => $frontEndPageUid, 'sendParametersToThankYouAfterRegistrationPageUrl' => 1, 'thankYouAfterRegistrationPID' => $frontEndPageUid, 'sendParametersToPageToShowAfterUnregistrationUrl' => 1, 'templateFile' => 'EXT:seminars/Resources/Private/Templates/FrontEnd/FrontEnd.html', 'logOutOneTimeAccountsAfterRegistration' => 1, 'showRegistrationFields' => 'registered_themselves,attendees_names', 'showFeUserFieldsInRegistrationForm' => 'name,email', 'showFeUserFieldsInRegistrationFormWithLabel' => 'email', 'form.' => array('unregistration.' => array(), 'registration.' => array('step1.' => array(), 'step2.' => array()))), $GLOBALS['TSFE']->cObj); $this->fixture->setAction('register'); $this->fixture->setSeminar($this->seminar); $this->fixture->setTestMode(); }
/** * Retrieves the data for a given key from the FE user session. Returns an * empty string if no data for that key is stored. * * @param mixed $unused (unused) * @param array $parameters * the contents of the "params" child of the userobj node as key/value pairs * (used for retrieving the current form field name) * * @return string the data stored in the FE user session under the given key, might be empty */ public function retrieveDataFromSession($unused, array $parameters) { return tx_oelib_Session::getInstance(tx_oelib_Session::TYPE_USER)->getAsString($this->prefixId . '_' . $parameters['key']); }