Example #1
0
 /**
  * @test
  */
 public function hasFakeFrontEndIsFalseAfterCreateAndDiscardFakeFrontEnd()
 {
     $this->subject->createFrontEndPage();
     $this->subject->createFakeFrontEnd();
     $this->subject->discardFakeFrontEnd();
     self::assertFalse($this->subject->hasFakeFrontEnd());
 }
Example #2
0
 /**
  * @test
  */
 public function purgeCachedConfigurationsDropsCachedConfiguration()
 {
     $this->testingFramework->discardFakeFrontEnd();
     Tx_Oelib_TemplateHelper::setCachedConfigurationValue('foo', 'bar');
     Tx_Oelib_TemplateHelper::purgeCachedConfigurations();
     $subject = new Tx_Oelib_TemplateHelper();
     $subject->init();
     self::assertSame('', $subject->getConfValueString('foo'));
 }
 /**
  * @test
  */
 public function getByExtensionNameDoesNotDeleteLanguageLabelsNotAffectedByTypoScript()
 {
     $testingFramework = new Tx_Oelib_TestingFramework('oelib');
     $testingFramework->createFakeFrontEnd();
     $this->getFrontEndController()->initLLvars();
     Tx_Oelib_ConfigurationRegistry::get('config')->set('language', 'default');
     Tx_Oelib_ConfigurationRegistry::get('plugin.tx_oelib._LOCAL_LANG')->setData(array('default.' => array()));
     Tx_Oelib_ConfigurationRegistry::get('plugin.tx_oelib._LOCAL_LANG.default')->set('label_test_2', 'I am from TypoScript.');
     self::assertSame('I am from file.', Tx_Oelib_TranslatorRegistry::get('oelib')->translate('label_test'));
     $testingFramework->discardFakeFrontEnd();
 }
 /**
  * @test
  */
 public function getLoggedInUserWithoutFrontEndReturnsNull()
 {
     $this->testingFramework->discardFakeFrontEnd();
     self::assertNull($this->subject->getLoggedInUser());
 }