Beispiel #1
0
 /**
  * @test
  */
 public function setConfigurationPageSetsTheExistingPidIsProvidedForThePageFinder()
 {
     $pageUid = $this->testingFramework->createFrontEndPage();
     $_SERVER['argv'][1] = $pageUid;
     $this->fixture->setConfigurationPage();
     self::assertSame($pageUid, tx_oelib_PageFinder::getInstance()->getPageUid());
 }
Beispiel #2
0
 /**
  * @test
  */
 public function populateListSpeakersForSetStoragePageAndUserWithSetAuxiliaryPidReturnsRecordWithAuxiliaryPid()
 {
     $pageUid = $this->testingFramework->createFrontEndPage(0, array('storage_pid' => 42));
     $this->testingFramework->createFakeFrontEnd($pageUid);
     $this->createLoginAndAddFrontEndUserToEventEditorFrontEndGroup(array('tx_seminars_auxiliary_records_pid' => 21));
     $speakerUid = $this->testingFramework->createRecord('tx_seminars_speakers', array('pid' => 21));
     self::assertTrue(in_array(array('caption' => '', 'value' => $speakerUid, 'wrapitem' => '|</td><td>&nbsp;'), $this->fixture->populateListSpeakers(array())));
 }
 /**
  * @test
  */
 public function createAndLoginFrontEndUserWithFrontEndUserGroupLogsInFrontEndUser()
 {
     $this->subject->createFrontEndPage();
     $this->subject->createFakeFrontEnd();
     $frontEndUserGroupUid = $this->subject->createFrontEndUserGroup();
     $this->subject->createAndLoginFrontEndUser($frontEndUserGroupUid);
     self::assertTrue($this->subject->isLoggedIn());
 }
 /**
  * @test
  */
 public function getAfterSetReturnsManuallySetConfigurationEvenIfThereIsAPage()
 {
     $pageUid = $this->testingFramework->createFrontEndPage();
     $this->testingFramework->createTemplate($pageUid, array('config' => 'plugin.tx_oelib.bar = 42'));
     Tx_Oelib_PageFinder::getInstance()->setPageUid($pageUid);
     $configuration = new Tx_Oelib_Configuration();
     Tx_Oelib_ConfigurationRegistry::getInstance()->set('plugin.tx_oelib', $configuration);
     self::assertSame($configuration, Tx_Oelib_ConfigurationRegistry::get('plugin.tx_oelib'));
 }
Beispiel #5
0
 /**
  * @test
  */
 public function hasStoragePidForGrspSetReturnsTrue()
 {
     $pageUid = $this->testingFramework->createFrontEndPage(0, array('storage_pid' => 42));
     $this->testingFramework->createFakeFrontEnd($pageUid);
     self::assertTrue($this->subject->hasStoragePid());
 }