Example #1
0
	/**
	 * Set up
	 */
	protected function setUp() {
		$this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
		$this->createMockedLoggerAndLogManager();

		$this->templateServiceMock = $this->getMock(\TYPO3\CMS\Core\TypoScript\TemplateService::class, array('getFileName', 'linkData'));
		$pageRepositoryMock = $this->getMock(\TYPO3\CMS\Frontend\Page\PageRepository::class, array('getRawRecord'));

		$this->typoScriptFrontendControllerMock = $this->getAccessibleMock(\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, array('dummy'), array(), '', FALSE);
		$this->typoScriptFrontendControllerMock->tmpl = $this->templateServiceMock;
		$this->typoScriptFrontendControllerMock->config = array();
		$this->typoScriptFrontendControllerMock->page = array();
		$this->typoScriptFrontendControllerMock->sys_page = $pageRepositoryMock;
		$this->typoScriptFrontendControllerMock->csConvObj = new CharsetConverter();
		$this->typoScriptFrontendControllerMock->renderCharset = 'utf-8';
		$GLOBALS['TSFE'] = $this->typoScriptFrontendControllerMock;

		$GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array());
		$GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] = 'mbstring';

		$this->subject = $this->getAccessibleMock(
			\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class,
			array('getResourceFactory', 'getEnvironmentVariable'),
			array($this->typoScriptFrontendControllerMock)
		);
		$this->subject->setContentObjectClassMap($this->contentObjectMap);
		$this->subject->start(array(), 'tt_content');
	}
 /**
  * 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'));
 }
 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();
 }
 public function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     $this->createAccessibleProxyClass();
     $this->backUpPackageManager = ExtensionManagementUtilityAccessibleProxy::getPackageManager();
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
 }
 /**
  * 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);
 }
 /**
  * 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);
 }
 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);
 }
Example #8
0
 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);
 }
 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();
 }
Example #10
0
 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);
 }
 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);
 }
 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;
 }
Example #13
0
 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);
 }
 /**
  * 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;
 }
Example #15
0
 /**
  * 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);
 }
 /**
  * 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;
 }
 protected function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     $this->dbProphecy = $this->prophesize(DatabaseConnection::class);
     $GLOBALS['TYPO3_DB'] = $this->dbProphecy->reveal();
     $languageService = $this->prophesize(LanguageService::class);
     $GLOBALS['LANG'] = $languageService->reveal();
     $languageService->sL(Argument::cetera())->willReturnArgument(0);
     $this->subject = new DatabaseSystemLanguageRows();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     /** @var FileRepository|\PHPUnit_Framework_MockObject_MockObject $fileRepositoryMock */
     $fileRepositoryMock = $this->getMock(FileRepository::class);
     GeneralUtility::setSingletonInstance(FileRepository::class, $fileRepositoryMock);
     $databaseMock = $this->getMock(DatabaseConnection::class);
     $databaseMock->expects($this->any())->method('exec_SELECTgetRows')->with('*', 'sys_file_storage', '1=1', '', 'name', '', 'uid')->willReturn(array());
     $GLOBALS['TYPO3_DB'] = $databaseMock;
 }
Example #19
0
 protected function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     // Disable xml2array cache used by ResourceFactory
     GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager')->setCacheConfigurations(array('cache_hash' => array('frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend', 'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\TransientMemoryBackend')));
     $this->setUpDocumentsStorageMock();
     $this->setUpLanguagesStorageMock();
     $mockedMetaDataRepository = $this->getMock('TYPO3\\CMS\\Core\\Resource\\Index\\MetaDataRepository');
     $mockedMetaDataRepository->expects($this->any())->method('findByFile')->will($this->returnValue(array('file' => 1)));
     GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Resource\\Index\\MetaDataRepository', $mockedMetaDataRepository);
 }
Example #20
0
 protected function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     // Suppress cache foo in xml helpers of GeneralUtility
     /** @var CacheManager|ObjectProphecy $cacheManagerProphecy */
     $cacheManagerProphecy = $this->prophesize(CacheManager::class);
     GeneralUtility::setSingletonInstance(CacheManager::class, $cacheManagerProphecy->reveal());
     $cacheFrontendProphecy = $this->prophesize(FrontendInterface::class);
     $cacheManagerProphecy->getCache(Argument::cetera())->willReturn($cacheFrontendProphecy->reveal());
     $this->subject = new TcaFlexFetch();
 }
Example #21
0
 /**
  * Set up
  */
 protected function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     $this->formProphecy = $this->prophesize('TYPO3\\CMS\\Form\\Domain\\Model\\Form');
     $this->typoScriptFactoryProphecy = $this->prophesize('TYPO3\\CMS\\Form\\Domain\\Factory\\TypoScriptFactory');
     $this->typoScriptFactoryProphecy->getLayoutFromTypoScript(Argument::any())->willReturn(array());
     GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Form\\Domain\\Factory\\TypoScriptFactory', $this->typoScriptFactoryProphecy->reveal());
     $this->typoScriptLayoutProphecy = $this->prophesize('TYPO3\\CMS\\Form\\Layout');
     $templateServiceProphecy = $this->prophesize('TYPO3\\CMS\\Core\\TypoScript\\TemplateService');
     $templateServiceProphecy->sortedKeyList(Argument::any())->willReturn(array(10, 20));
     GeneralUtility::addInstance('TYPO3\\CMS\\Core\\TypoScript\\TemplateService', $templateServiceProphecy->reveal());
 }
 /**
  *
  */
 public function setUp()
 {
     $contentObjectRendererProphecy = $this->prophesize('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
     GeneralUtility::addInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', $contentObjectRendererProphecy->reveal());
     $localisationProphecy = $this->prophesize('TYPO3\\CMS\\Form\\Localization');
     GeneralUtility::addInstance('TYPO3\\CMS\\Form\\Localization', $localisationProphecy->reveal());
     $requestProphecy = $this->prophesize('TYPO3\\CMS\\Form\\Request');
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Form\\Request', $requestProphecy->reveal());
     $this->elementId = uniqid('elementId_', TRUE);
     $this->subject = new AttributesAttribute($this->elementId);
 }
Example #23
0
 public function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     // Disable xml2array cache used by ResourceFactory
     GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager')->setCacheConfigurations(array('cache_hash' => array('frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend', 'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\TransientMemoryBackend')));
     $this->testDocumentsPath = ExtensionManagementUtility::extPath('tika') . 'Tests/TestDocuments/';
     $driver = $this->createDriverFixture(array('basePath' => $this->testDocumentsPath, 'caseSensitive' => TRUE));
     $storageRecord = array('uid' => $this->storageUid, 'is_public' => TRUE, 'is_writable' => FALSE, 'is_browsable' => TRUE, 'is_online' => TRUE, 'configuration' => $this->convertConfigurationArrayToFlexformXml(array('basePath' => $this->testDocumentsPath, 'pathType' => 'absolute', 'caseSensitive' => '1')));
     $this->storageMock = $this->getMock('TYPO3\\CMS\\Core\\Resource\\ResourceStorage', NULL, array($driver, $storageRecord));
     $this->storageMock->expects($this->any())->method('getUid')->will($this->returnValue($this->storageUid));
     $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);
 }
 /**
  * Set up
  *
  * @return void
  */
 public function setUp()
 {
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->fileCollectionMock = $this->getAccessibleMock('\\TYPO3\\CMS\\Core\\Resource\\Collection\\AbstractFileCollection', array('loadContents', 'getItems'), array(), '', FALSE);
     $this->fileCollectionMock->expects($this->atLeastOnce())->method('loadContents');
     $this->fileCollectionRepositoryMock = $this->getMock('\\TYPO3\\CMS\\Core\\Resource\\FileCollectionRepository', array('findByUid'), array(), '', FALSE);
     $this->fileCollectionRepositoryMock->expects($this->any())->method('findByUid')->will($this->returnValue($this->fileCollectionMock));
     $this->frontendConfigurationManagerMock = $this->getMock('\\TYPO3\\CMS\\Extbase\\Configuration\\FrontendConfigurationManager', array('getConfiguration'), array(), '', FALSE);
     $this->storageMock = $this->getMock('TYPO3\\CMS\\Core\\Resource\\ResourceStorage', array(), array(), '', FALSE);
     $this->storageMock->expects($this->any())->method('getUid')->will($this->returnValue(5));
     $this->subject = GeneralUtility::makeInstance('SKYFILLERS\\SfFilecollectionGallery\\Service\\FileCollectionService');
     $this->subject->injectFileCollectionRepository($this->fileCollectionRepositoryMock);
     $this->subject->injectFrontendConfigurationManager($this->frontendConfigurationManagerMock);
 }
 /**
  * Sets up this testcase
  */
 public function setUp()
 {
     $this->markTestIncomplete('needs to be fixed');
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances();
     $this->storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');
     // Initializing file processor
     $GLOBALS['BE_USER'] = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', array('getSessionData', 'setAndSaveSessionData'));
     $GLOBALS['BE_USER']->user['uid'] = 1;
     // Initializing:
     $this->fileProcessor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtility');
     $this->fileProcessor->init(array(), $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
     $this->fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
     $this->fileProcessor->dontCheckForUnique = 1;
 }
 /**
  * Set up
  */
 protected function setUp()
 {
     $this->currentLocale = setlocale(LC_NUMERIC, 0);
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     $this->createMockedLoggerAndLogManager();
     $this->templateServiceMock = $this->getMock(TemplateService::class, array('getFileName', 'linkData'));
     $pageRepositoryMock = $this->getMock(PageRepositoryFixture::class, array('getRawRecord', 'getMountPointInfo'));
     $this->typoScriptFrontendControllerMock = $this->getAccessibleMock(TypoScriptFrontendController::class, array('dummy'), array(), '', false);
     $this->typoScriptFrontendControllerMock->tmpl = $this->templateServiceMock;
     $this->typoScriptFrontendControllerMock->config = array();
     $this->typoScriptFrontendControllerMock->page = array();
     $this->typoScriptFrontendControllerMock->sys_page = $pageRepositoryMock;
     $GLOBALS['TSFE'] = $this->typoScriptFrontendControllerMock;
     $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array());
     $this->subject = $this->getAccessibleMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class, array('getResourceFactory', 'getEnvironmentVariable'), array($this->typoScriptFrontendControllerMock));
     $this->subject->setContentObjectClassMap($this->contentObjectMap);
     $this->subject->start(array(), 'tt_content');
 }
 /**
  * Set up
  */
 protected function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     $this->createMockedLoggerAndLogManager();
     $this->templateServiceMock = $this->getMock(TemplateService::class, array('getFileName'));
     $pageRepositoryMock = $this->getMock(PageRepository::class, array('getPage'));
     $this->typoScriptFrontendControllerMock = $this->getAccessibleMock(TypoScriptFrontendController::class, array('dummy'), array(), '', false);
     $this->typoScriptFrontendControllerMock->tmpl = $this->templateServiceMock;
     $this->typoScriptFrontendControllerMock->config = array();
     $this->typoScriptFrontendControllerMock->page = array();
     $this->typoScriptFrontendControllerMock->sys_page = $pageRepositoryMock;
     $this->typoScriptFrontendControllerMock->csConvObj = new CharsetConverter();
     $this->typoScriptFrontendControllerMock->renderCharset = 'utf-8';
     $GLOBALS['TSFE'] = $this->typoScriptFrontendControllerMock;
     $GLOBALS['TT'] = $this->getMock(TimeTracker::class, array('dummy'));
     $GLOBALS['TYPO3_DB'] = $this->getMock(DatabaseConnection::class, array());
     $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = '12345';
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlProcessors']['jumpurl']['processor'] = JumpUrlProcessor::class;
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlHandlers']['jumpurl']['handler'] = JumpUrlHandler::class;
     $this->subject = $this->getAccessibleMock(ContentObjectRenderer::class, array('getResourceFactory', 'getEnvironmentVariable'), array($this->typoScriptFrontendControllerMock));
     $this->subject->start(array(), 'tt_content');
 }
 /**
  * @test
  */
 public function resetSingletonInstancesSetsGivenInstance()
 {
     $instance = $this->getMock('TYPO3\\CMS\\Core\\SingletonInterface');
     $instanceClassName = get_class($instance);
     Utility\GeneralUtility::resetSingletonInstances(array($instanceClassName => $instance));
     $registeredSingletonInstances = Utility\GeneralUtility::getSingletonInstances();
     $this->assertArrayHasKey($instanceClassName, $registeredSingletonInstances);
     $this->assertSame($registeredSingletonInstances[$instanceClassName], $instance);
 }
 protected function setUp()
 {
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
     $this->subject = new TcaCheckboxItems();
 }
Example #30
0
 public function setUp()
 {
     $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
     vfsStream::setup($this->basedir);
 }