Ejemplo n.º 1
0
 /**
  * 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();
 }
Ejemplo n.º 2
0
 public function testListViewSortedByCategoryWithoutStaticTemplateDoesNotCrash()
 {
     $fixture = new tx_seminars_FrontEnd_DefaultController();
     $fixture->init(array('sortListViewByCategory' => 1));
     $fixture->main('', array());
 }
Ejemplo n.º 3
0
 /**
  * @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');
 }