当前位置: 首页>>代码示例>>PHP>>正文


PHP GeneralUtility::getSingletonInstances方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances方法的典型用法代码示例。如果您正苦于以下问题:PHP GeneralUtility::getSingletonInstances方法的具体用法?PHP GeneralUtility::getSingletonInstances怎么用?PHP GeneralUtility::getSingletonInstances使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Core\Utility\GeneralUtility的用法示例。


在下文中一共展示了GeneralUtility::getSingletonInstances方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 /**
  * Set up
  */
 public function setUp()
 {
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $GLOBALS['BE_USER'] = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', array('getSessionData', 'setAndSaveSessionData'));
     $GLOBALS['BE_USER']->user['uid'] = 1;
     $this->subject = $this->getAccessibleMock('TYPO3\\CMS\\Core\\FormProtection\\BackendFormProtection', array('acquireLock', 'releaseLock', 'getLanguageService', 'isAjaxRequest'));
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:10,代码来源:BackendFormProtectionTest.php

示例2: setUp

 public function setUp()
 {
     $this->createAccessibleProxyClass();
     $this->globals = array('TYPO3_LOADED_EXT' => serialize($GLOBALS['TYPO3_LOADED_EXT']));
     $this->testFilesToDelete = array();
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:7,代码来源:ExtensionMangementUtilityTest.php

示例3: setUp

 public function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     $this->createAccessibleProxyClass();
     $this->backUpPackageManager = ExtensionManagementUtilityAccessibleProxy::getPackageManager();
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
 }
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:7,代码来源:ExtensionManagementUtilityTest.php

示例4: setUp

 /**
  * Sets up this test suite.
  */
 protected function setUp()
 {
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->filter = new \TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter();
     $this->tceMainMock = $this->getMock(\TYPO3\CMS\Core\DataHandling\DataHandler::class, array('deleteAction'), array());
     $this->fileFactoryMock = $this->getMock(\TYPO3\CMS\Core\Resource\ResourceFactory::class, array('getFileReferenceObject'), array());
     \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Core\Resource\ResourceFactory::class, $this->fileFactoryMock);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:11,代码来源:FileExtensionFilterTest.php

示例5: setUp

 /**
  * Set up
  */
 protected function setUp()
 {
     if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('scheduler')) {
         $this->markTestSkipped('Tests need EXT:scheduler loaded.');
     }
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->repositoryHelper = $this->getMock(\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper::class, array(), array(), '', FALSE);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:11,代码来源:UpdateExtensionListTaskTest.php

示例6: setUp

 public function setUp()
 {
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->databaseBackup = $GLOBALS['TYPO3_DB'];
     $this->backEndUser = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
     $this->fixture = new \TYPO3\CMS\Core\DataHandling\DataHandler();
     $this->fixture->start(array(), '', $this->backEndUser);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:8,代码来源:DataHandlerTest.php

示例7: setUp

 public function setUp()
 {
     $GLOBALS['TCA'] = array();
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->backEndUser = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
     $this->subject = new \TYPO3\CMS\Core\DataHandling\DataHandler();
     $this->subject->start(array(), '', $this->backEndUser);
 }
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:8,代码来源:DataHandlerTest.php

示例8: setUp

 public function setUp()
 {
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->createAccessibleProxyClass();
     $this->testFilesToDelete = array();
     $this->backUpPackageManager = ExtensionManagementUtilityAccessibleProxy::getPackageManager();
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
 }
开发者ID:KarlDennisMatthaei1923,项目名称:PierraaDesign,代码行数:8,代码来源:ExtensionManagementUtilityTest.php

示例9: setUp

 protected function setUp()
 {
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->storageMock = $this->getMock(\TYPO3\CMS\Core\Resource\ResourceStorage::class, array(), array(), '', false);
     $this->storageMock->expects($this->any())->method('getUid')->will($this->returnValue(5));
     $mockedMetaDataRepository = $this->getMock(\TYPO3\CMS\Core\Resource\Index\MetaDataRepository::class);
     $mockedMetaDataRepository->expects($this->any())->method('findByFile')->will($this->returnValue(array('file' => 1)));
     \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Core\Resource\Index\MetaDataRepository::class, $mockedMetaDataRepository);
 }
开发者ID:rickymathew,项目名称:TYPO3.CMS,代码行数:9,代码来源:FileTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     // use a mocked file repository to avoid updating the index when doing property update tests
     $mockedRepository = $this->getMock('TYPO3\\CMS\\Core\\Resource\\FileRepository');
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances();
     \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository', $mockedRepository);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:9,代码来源:LocalDriverTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository', $this->getMock('TYPO3\\CMS\\Core\\Resource\\FileRepository'));
     $databaseMock = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection');
     $databaseMock->expects($this->any())->method('exec_SELECTgetRows')->with('*', 'sys_file_storage', '1=1', '', 'name', '', 'uid')->willReturn(array());
     $GLOBALS['TYPO3_DB'] = $databaseMock;
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:9,代码来源:ResourceStorageTest.php

示例12: setUp

 public function setUp()
 {
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->storageMock = $this->getMock('TYPO3\\CMS\\Core\\Resource\\ResourceStorage', array(), array(), '', FALSE);
     $this->storageMock->expects($this->any())->method('getUid')->will($this->returnValue(5));
     $mockedMetaDataRepository = $this->getMock('TYPO3\\CMS\\Core\\Resource\\Index\\MetaDataRepository');
     $mockedMetaDataRepository->expects($this->any())->method('findByFile')->will($this->returnValue(array('file' => 1)));
     \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Resource\\Index\\MetaDataRepository', $mockedMetaDataRepository);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:9,代码来源:FileTest.php

示例13: setUp

 /**
  * Set up
  */
 protected function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     $this->contentObjectRenderer = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
     $this->subject = $this->getAccessibleMock(\TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::class, array('initializeStandaloneViewInstance'), array($this->contentObjectRenderer));
     /** @var $tsfe \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController */
     $tsfe = $this->getMock(\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, array(), array(), '', false);
     $tsfe->tmpl = $this->getMock(\TYPO3\CMS\Core\TypoScript\TemplateService::class);
     $GLOBALS['TSFE'] = $tsfe;
 }
开发者ID:graurus,项目名称:testgit_t37,代码行数:13,代码来源:FluidTemplateContentObjectTest.php

示例14: setUp

 /**
  * Set up the tests
  */
 protected function setUp()
 {
     $GLOBALS['TCA'] = array();
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     $this->backEndUser = $this->getMock(BackendUserAuthentication::class);
     $this->mockDatabaseConnection = $this->getMock(DatabaseConnection::class, array(), array(), '', FALSE);
     $GLOBALS['TYPO3_DB'] = $this->mockDatabaseConnection;
     $this->subject = $this->getAccessibleMock(DataHandler::class, ['dummy']);
     $this->subject->start(array(), '', $this->backEndUser);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:13,代码来源:DataHandlerTest.php

示例15: setUp

 /**
  * Set up
  */
 public function setUp()
 {
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->contentObjectRenderer = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
     $this->fixture = $this->getAccessibleMock('TYPO3\\CMS\\Frontend\\ContentObject\\FluidTemplateContentObject', array('dummy', 'initializeStandaloneViewInstance'), array($this->contentObjectRenderer));
     /** @var $tsfe \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController */
     $tsfe = $this->getMock('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', array(), array(), '', FALSE);
     $tsfe->tmpl = $this->getMock('TYPO3\\CMS\\Core\\TypoScript\\TemplateService');
     $GLOBALS['TSFE'] = $tsfe;
 }
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:13,代码来源:FluidTemplateContentObjectTest.php


注:本文中的TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。