Example #1
0
 protected function setUp()
 {
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_seminars');
     $this->configuration = new Tx_Oelib_Configuration();
     $this->configuration->setAsString('timeFormat', self::TIME_FORMAT);
     Tx_Oelib_ConfigurationRegistry::getInstance()->set('plugin.tx_seminars', $this->configuration);
     $this->translator = Tx_Oelib_TranslatorRegistry::getInstance()->get('seminars');
     $this->translatedHours = ' ' . $this->translator->translate('label_hours');
     $this->subject = new tx_seminars_ViewHelper_TimeRange();
 }
 /**
  * Cleans up oelib after running a test.
  *
  * @return void
  */
 public function cleanUp()
 {
     Tx_Oelib_ConfigurationProxy::purgeInstances();
     Tx_Oelib_BackEndLoginManager::purgeInstance();
     Tx_Oelib_ConfigurationRegistry::purgeInstance();
     Tx_Oelib_FrontEndLoginManager::purgeInstance();
     tx_oelib_Geocoding_Google::purgeInstance();
     tx_oelib_headerProxyFactory::purgeInstance();
     Tx_Oelib_MapperRegistry::purgeInstance();
     Tx_Oelib_PageFinder::purgeInstance();
     Tx_Oelib_Session::purgeInstances();
     Tx_Oelib_TemplateHelper::purgeCachedConfigurations();
     Tx_Oelib_TranslatorRegistry::purgeInstance();
     /** @var Tx_Oelib_MailerFactory $mailerFactory */
     $mailerFactory = t3lib_div::makeInstance('Tx_Oelib_MailerFactory');
     $mailerFactory->cleanUp();
 }
Example #3
0
 /**
  * The constructor.
  */
 public function __construct()
 {
     $this->configuration = Tx_Oelib_ConfigurationRegistry::getInstance()->get('plugin.tx_seminars');
     $this->translator = Tx_Oelib_TranslatorRegistry::getInstance()->get('seminars');
 }
 /**
  * @test
  */
 public function setLanguageKeyForEmptyStringGivenThrowsException()
 {
     $this->setExpectedException('InvalidArgumentException', 'The given language key must not be empty.');
     Tx_Oelib_TranslatorRegistry::getInstance()->setLanguageKey('');
 }
Example #5
0
 /**
  * Purges the current instance so that getInstance will create a new instance.
  *
  * @return void
  */
 public static function purgeInstance()
 {
     self::$instance = NULL;
 }
 /**
  * the constructor
  */
 public function __construct()
 {
     $this->translator = Tx_Oelib_TranslatorRegistry::getInstance()->get('seminars');
 }