/** * Set up $GLOBALS['TYPO3_LOADED_EXT'] array with basic information * about extensions. * * @param boolean $allowCaching * @return \TYPO3\CMS\Core\Core\Bootstrap */ protected function populateTypo3LoadedExtGlobal($allowCaching = TRUE) { $GLOBALS['TYPO3_LOADED_EXT'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadTypo3LoadedExtensionInformation($allowCaching); return $this; }
/** * @test */ public function loadTypo3LoadedExtensionInformationSetsNewCacheEntryWithNoTags() { $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE); $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache')); $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache)); $mockCache->expects($this->any())->method('has')->will($this->returnValue(FALSE)); $mockCache->expects($this->once())->method('set')->with($this->anything(), $this->anything(), $this->equalTo(array())); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadTypo3LoadedExtensionInformation(TRUE); }