/** * Creates a fake front end and a pi1 instance in $this->pi1. * * @param int $detailPageUid UID of the detail view page * * @return void */ private function createPi1($detailPageUid = 0) { $this->testingFramework->createFakeFrontEnd(); $this->pi1 = new tx_seminars_FrontEnd_DefaultController(); $this->pi1->init(array('isStaticTemplateLoaded' => 1, 'templateFile' => 'EXT:seminars/Resources/Private/Templates/FrontEnd/FrontEnd.html', 'detailPID' => $detailPageUid)); $this->pi1->getTemplateCode(); }
/** * @test */ public function createSingleViewLinkByWithHtmlSpecialCharsFalseNotHtmlSpecialCharsLinkText() { /** @var tx_seminars_Model_Event $event */ $event = tx_oelib_MapperRegistry::get('tx_seminars_Mapper_Event')->getLoadedTestingModel(array()); self::assertContains('Chaos & Confusion', $this->fixture->createSingleViewLink($event, 'Chaos & Confusion', FALSE)); }
/** * @test */ public function notifyAttendeeForQueueUpdateMailAndUnregistrationPossibleAddsUnregistrationNotice() { $fixture = $this->getMock('tx_seminars_registrationmanager', array('getUnregistrationNotice')); $fixture->expects(self::once())->method('getUnregistrationNotice'); $fixture->setConfigurationValue('sendConfirmationOnQueueUpdate', TRUE); $registration = $this->createRegistration(); $this->testingFramework->changeRecord('tx_seminars_seminars', $this->seminarUid, array('deadline_unregistration' => $GLOBALS['SIM_EXEC_TIME'] + tx_oelib_Time::SECONDS_PER_DAY, 'queue_size' => 1)); $this->testingFramework->changeRecord('tx_seminars_attendances', $registration->getUid(), array('registration_queue' => 1)); $pi1 = new tx_seminars_FrontEnd_DefaultController(); $pi1->init(); $fixture->notifyAttendee($registration, $pi1, 'confirmationOnQueueUpdate'); }