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(); }
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); } }