Пример #1
0
 protected function setUp()
 {
     $this->typo3ConfigurationVariablesBackup = $GLOBALS['TYPO3_CONF_VARS'];
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = '';
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] = '';
     $this->subject = $this->createAccessibleProxy();
     $this->extensionSettingsService = new \Tx_Phpunit_TestingDataContainer();
     $this->subject->injectExtensionSettingsService($this->extensionSettingsService);
 }
Пример #2
0
 public function setUp()
 {
     $this->typo3ConfigurationVariablesBackup = $GLOBALS['TYPO3_CONF_VARS'];
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = '';
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] = '';
     $this->fixture = $this->createAccessibleProxy();
     $this->extensionSettingsService = new Tx_Phpunit_TestingDataContainer();
     $this->fixture->injectExtensionSettingsService($this->extensionSettingsService);
     $this->fixturesPath = t3lib_extMgm::extPath('phpunit') . 'Tests/Unit/Service/Fixtures/';
 }
 protected function setUp()
 {
     $this->subject = new Tx_Phpunit_ViewHelpers_ExtensionSelectorViewHelper();
     $this->outputService = new Tx_Phpunit_Service_FakeOutputService();
     $this->subject->injectOutputService($this->outputService);
     $this->extensionSettingsService = new Tx_Phpunit_TestingDataContainer();
     $this->testFinder = new Tx_Phpunit_Service_TestFinder();
     $this->testFinder->injectExtensionSettingsService($this->extensionSettingsService);
     $this->subject->injectTestFinder($this->testFinder);
     $this->userSettingsService = new Tx_Phpunit_TestingDataContainer();
     $this->subject->injectUserSettingService($this->userSettingsService);
 }
Пример #4
0
 protected function setUp()
 {
     $this->backEndUserBackup = $GLOBALS['BE_USER'];
     $this->getLanguageService()->includeLLFile('EXT:phpunit/Resources/Private/Language/locallang_backend.xlf');
     $subjectClassName = $this->createAccessibleProxy();
     $this->subject = new $subjectClassName();
     $this->request = new Tx_Phpunit_TestingDataContainer();
     $this->subject->injectRequest($this->request);
     $this->outputService = new Tx_Phpunit_Service_FakeOutputService();
     $this->subject->injectOutputService($this->outputService);
     $this->userSettingsService = new Tx_Phpunit_TestingDataContainer();
     $this->subject->injectUserSettingsService($this->userSettingsService);
     $this->testFinder = new Tx_Phpunit_Service_TestFinder();
     $this->extensionSettingsService = new Tx_Phpunit_TestingDataContainer();
     $this->testFinder->injectExtensionSettingsService($this->extensionSettingsService);
     $this->subject->injectTestFinder($this->testFinder);
     $this->testCaseService = new Tx_Phpunit_Service_TestCaseService();
     $this->testCaseService->injectUserSettingsService($this->userSettingsService);
     $this->subject->injectTestCaseService($this->testCaseService);
     $this->progressBarViewHelper = $this->getMock('Tx_Phpunit_ViewHelpers_ProgressBarViewHelper');
     GeneralUtility::addInstance('Tx_Phpunit_ViewHelpers_ProgressBarViewHelper', $this->progressBarViewHelper);
     $this->documentTemplate = $this->getMock('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate', array('startPage'));
     GeneralUtility::addInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate', $this->documentTemplate);
     $this->singletonInstances = GeneralUtility::getSingletonInstances();
 }
Пример #5
0
 public function setUp()
 {
     $this->backEndUserBackup = $GLOBALS['BE_USER'];
     $fixtureClassName = $this->createAccessibleProxy();
     $this->fixture = new $fixtureClassName();
     $this->request = new Tx_Phpunit_TestingDataContainer();
     $this->fixture->injectRequest($this->request);
     $this->outputService = new Tx_Phpunit_Service_FakeOutputService();
     $this->fixture->injectOutputService($this->outputService);
     $this->userSettingsService = new Tx_Phpunit_TestingDataContainer();
     $this->fixture->injectUserSettingsService($this->userSettingsService);
     $this->testFinder = new Tx_Phpunit_Service_TestFinder();
     $this->extensionSettingsService = new Tx_Phpunit_TestingDataContainer();
     $this->testFinder->injectExtensionSettingsService($this->extensionSettingsService);
     $this->fixture->injectTestFinder($this->testFinder);
     $this->testCaseService = new Tx_Phpunit_Service_TestCaseService();
     $this->testCaseService->injectUserSettingsService($this->userSettingsService);
     $this->fixture->injectTestCaseService($this->testCaseService);
     $this->progressBarViewHelper = $this->getMock('Tx_Phpunit_ViewHelpers_ProgressBarViewHelper');
     t3lib_div::addInstance('Tx_Phpunit_ViewHelpers_ProgressBarViewHelper', $this->progressBarViewHelper);
     $this->bigDocumentTemplate = $this->getMock('bigDoc', array('startPage'));
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) < 6000000) {
         t3lib_div::addInstance('bigDoc', $this->bigDocumentTemplate);
     } else {
         t3lib_div::addInstance('TYPO3\\CMS\\Backend\\Template\\BigDocumentTemplate', $this->bigDocumentTemplate);
     }
 }
 protected function setUp()
 {
     if (!empty($GLOBALS['LANG'])) {
         $this->languageServiceBackup = $GLOBALS['LANG'];
     }
     /** @var LanguageService|\PHPUnit_Framework_MockObject_MockObject $languageServiceMock */
     $languageServiceMock = $this->getMock('TYPO3\\CMS\\Lang\\LanguageService');
     $languageServiceMock->expects($this->any())->method('getLL')->willReturn('translatedLabel');
     $GLOBALS['LANG'] = $languageServiceMock;
     $this->subject = new \Tx_Phpunit_ViewHelpers_ExtensionSelectorViewHelper();
     $this->outputService = new \Tx_Phpunit_Service_FakeOutputService();
     $this->subject->injectOutputService($this->outputService);
     $this->extensionSettingsService = new \Tx_Phpunit_TestingDataContainer();
     $this->testFinder = new \Tx_Phpunit_Service_TestFinder();
     $this->testFinder->injectExtensionSettingsService($this->extensionSettingsService);
     $this->subject->injectTestFinder($this->testFinder);
     $this->userSettingsService = new \Tx_Phpunit_TestingDataContainer();
     $this->subject->injectUserSettingService($this->userSettingsService);
 }