コード例 #1
0
 protected function setUp()
 {
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('seminars') . 'locallang_db.xml');
     $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('lang') . 'locallang_general.xml');
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_seminars');
     $configurationRegistry = Tx_Oelib_ConfigurationRegistry::getInstance();
     $configurationRegistry->set('plugin', new Tx_Oelib_Configuration());
     $this->configuration = new Tx_Oelib_Configuration();
     $this->configuration->setData(array('charsetForCsv' => 'utf-8'));
     $configurationRegistry->set('plugin.tx_seminars', $this->configuration);
     $this->pageUid = $this->testingFramework->createSystemFolder();
     $this->eventUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('pid' => $this->pageUid, 'begin_date' => $GLOBALS['SIM_EXEC_TIME']));
     $this->subject = new Tx_Seminars_Csv_EmailRegistrationListView();
     $this->subject->setEventUid($this->eventUid);
 }
コード例 #2
0
ファイル: DbTest.php プロジェクト: Konafets/oelib
 /**
  * @test
  */
 public function createRecursivePageListHeedsDecreasingRecursionDepthOnSubsequentCalls()
 {
     $uid = $this->testingFramework->createSystemFolder();
     $subFolderUid = $this->testingFramework->createSystemFolder($uid);
     self::assertSame($this->sortExplode($uid . ',' . $subFolderUid), $this->sortExplode(Tx_Oelib_Db::createRecursivePageList($uid, 1)));
     self::assertSame((string) $uid, Tx_Oelib_Db::createRecursivePageList($uid, 0));
 }
コード例 #3
0
ファイル: pi2Test.php プロジェクト: Konafets/seminars
 /**
  * @test
  */
 public function createAndOuptutListOfRegistrationsForNoEventUidGivenReturnsRegistrationsOnSubpageOfCurrentPage()
 {
     $this->fixture->piVars['pid'] = $this->pid;
     $subpagePid = $this->testingFramework->createSystemFolder($this->pid);
     $this->configuration->setAsString('fieldsFromAttendanceForCsv', 'address');
     $this->testingFramework->createRecord('tx_seminars_attendances', array('seminar' => $this->eventUid, 'user' => $this->testingFramework->createFrontEndUser(), 'address' => 'foo', 'pid' => $subpagePid));
     self::assertContains('foo', $this->fixture->createAndOutputListOfRegistrations());
 }
コード例 #4
0
 /**
  * @test
  */
 public function contentElementCanBeCreatedOnNonRootPage()
 {
     $parent = $this->subject->createSystemFolder();
     $uid = $this->subject->createContentElement($parent);
     self::assertNotSame(0, $uid);
     $row = Tx_Oelib_Db::selectSingle('pid', 'tt_content', 'uid = ' . $uid);
     self::assertSame($parent, (int) $row['pid']);
 }
コード例 #5
0
ファイル: EventListViewTest.php プロジェクト: kurtkk/seminars
 /**
  * @test
  */
 public function renderCanContainEventFromSubFolder()
 {
     $pageUid = $this->testingFramework->createSystemFolder();
     $this->subject->setPageUid($pageUid);
     $subFolderPid = $this->testingFramework->createSystemFolder($pageUid);
     $this->testingFramework->createRecord('tx_seminars_seminars', array('pid' => $subFolderPid, 'title' => 'another event'));
     $this->configuration->setAsString('fieldsFromEventsForCsv', 'title');
     self::assertContains('another event', $this->subject->render($this->pageUid));
 }
コード例 #6
0
 /**
  * @test
  */
 public function renderReturnsRegistrationsOnSubpageOfGivenPage()
 {
     $this->subject->setEventUid(0);
     $this->subject->setPageUid($this->pageUid);
     $subpagePid = $this->testingFramework->createSystemFolder($this->pageUid);
     $this->registrationFieldKeys = array('address');
     $this->testingFramework->createRecord('tx_seminars_attendances', array('seminar' => $this->eventUid, 'user' => $this->testingFramework->createFrontEndUser(), 'address' => 'foo', 'pid' => $subpagePid));
     self::assertContains('foo', $this->subject->render());
 }
コード例 #7
0
ファイル: EventsListTest.php プロジェクト: kurtkk/seminars
 /**
  * @test
  */
 public function showContainsEventFromSubfolder()
 {
     $subfolderPid = $this->testingFramework->createSystemFolder($this->dummySysFolderPid);
     $this->testingFramework->createRecord('tx_seminars_seminars', array('title' => 'Event in subfolder', 'pid' => $subfolderPid));
     self::assertContains('Event in subfolder', $this->fixture->show());
 }