/** * 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(); }
/** * @test */ public function getInstanceWithSameTypesAfterPurgeInstancesReturnsNewInstance() { $this->testingFramework->createFakeFrontEnd(); $firstInstance = Tx_Oelib_Session::getInstance(Tx_Oelib_Session::TYPE_USER); Tx_Oelib_Session::purgeInstances(); self::assertNotSame($firstInstance, Tx_Oelib_Session::getInstance(Tx_Oelib_Session::TYPE_USER)); }