[TASK] Properly reset unit test singletons 69/57169/11
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 10 Jun 2018 17:30:14 +0000 (19:30 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 11 Jun 2018 05:27:00 +0000 (07:27 +0200)
commit6bfaefaf8210307e7af0d55b261120a7d1556827
tree1b0b36a69651b9ef861f8f4ca3b5384536dba236
parent330a3d39b4a3f525c177bf24c733336c4c1dcee5
[TASK] Properly reset unit test singletons

typo3/testing-framework since version 3.8.0 can reset
singletons created by makeInstance automatically
if $this->$resetSingletonInstances is set to true.

This version additionally checks for left over singletons
in case that property has not been set and lets tests
fail in this case.

composer require --dev typo3/testing-framework:^3.8

As advantage, a manual backup of singleton instances
within tests is not needed anymore.

The patch comes with a set of test case adaptions to
cope with this new situation.

Change-Id: Ib5f278145e385e32d543541872cf5e1f208fad47
Resolves: #85209
Releases: master
Reviewed-on: https://review.typo3.org/57169
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
92 files changed:
composer.json
composer.lock
typo3/sysext/adminpanel/Tests/Unit/Middleware/AdminPanelInitiatorTest.php
typo3/sysext/backend/Tests/Unit/Controller/LoginControllerTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseSystemLanguageRowsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaCheckboxItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexPrepareTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaGroupTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRadioItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectTreeItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/InlineStackProcessorTest.php
typo3/sysext/backend/Tests/UnitDeprecated/Form/FormDataProvider/TcaFlexPrepareTest.php
typo3/sysext/core/Classes/Log/LogManager.php
typo3/sysext/core/Tests/Integrity/IntegrityTest.php [deleted file]
typo3/sysext/core/Tests/Unit/Authentication/AuthenticationServiceTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/PdoBackendTest.php
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/FlexFormToolsTest.php
typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
typo3/sysext/core/Tests/Unit/Database/Schema/Parser/TableBuilderTest.php
typo3/sysext/core/Tests/Unit/Database/Schema/SqlReaderTest.php
typo3/sysext/core/Tests/Unit/Html/RteHtmlParserTest.php
typo3/sysext/core/Tests/Unit/Imaging/IconFactoryTest.php
typo3/sysext/core/Tests/Unit/Log/LogManagerTest.php
typo3/sysext/core/Tests/Unit/Mail/MailerTest.php
typo3/sysext/core/Tests/Unit/Mail/TransportFactoryTest.php
typo3/sysext/core/Tests/Unit/MetaTag/MetaTagManagerRegistryTest.php
typo3/sysext/core/Tests/Unit/Page/PageRendererTest.php
typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php
typo3/sysext/core/Tests/Unit/Resource/FileReferenceTest.php
typo3/sysext/core/Tests/Unit/Resource/FileTest.php
typo3/sysext/core/Tests/Unit/Resource/FolderTest.php
typo3/sysext/core/Tests/Unit/Resource/ProcessedFileTest.php
typo3/sysext/core/Tests/Unit/Resource/Rendering/RendererRegistryTest.php
typo3/sysext/core/Tests/Unit/Resource/ResourceFactoryTest.php
typo3/sysext/core/Tests/Unit/Resource/ResourceStorageTest.php
typo3/sysext/core/Tests/Unit/Service/MarkerBasedTemplateServiceTest.php
typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/MailUtilityTest.php
typo3/sysext/core/Tests/UnitDeprecated/Encoder/JavaScriptEncoderTest.php
typo3/sysext/core/Tests/UnitDeprecated/Html/RteHtmlParserTest.php
typo3/sysext/core/Tests/UnitDeprecated/Utility/ExtensionManagementUtilityTest.php
typo3/sysext/core/composer.json
typo3/sysext/extbase/Tests/Unit/Core/BootstrapTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Cli/CommandTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php
typo3/sysext/extbase/Tests/Unit/Object/Container/ContainerTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php
typo3/sysext/extbase/Tests/Unit/Reflection/ClassSchemaTest.php
typo3/sysext/extbase/Tests/Unit/Service/FlexFormServiceTest.php
typo3/sysext/extbase/Tests/Unit/Service/ImageScriptServiceTest.php
typo3/sysext/extbase/Tests/Unit/SignalSlot/DispatcherTest.php
typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/ClassSchemaTest.php
typo3/sysext/extensionmanager/Tests/Unit/Task/UpdateExtensionListTaskTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/ExtensionModelUtilityTest.php
typo3/sysext/felogin/Tests/Unit/Controller/FrontendLoginControllerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Cache/FluidTemplateCacheTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CObjectViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ImageViewHelperTest.php
typo3/sysext/form/Tests/Unit/Controller/FormEditorControllerTest.php
typo3/sysext/form/Tests/Unit/Controller/FormManagerControllerTest.php
typo3/sysext/form/Tests/Unit/Domain/Finishers/AbstractFinisherTest.php
typo3/sysext/form/Tests/Unit/Domain/FormElements/AbstractSectionTest.php
typo3/sysext/form/Tests/Unit/Domain/Runtime/FormRuntimeTest.php
typo3/sysext/form/Tests/Unit/Hooks/DataStructureIdentifierHookTest.php
typo3/sysext/form/Tests/Unit/Mvc/ProcessingRuleTest.php
typo3/sysext/form/Tests/Unit/Mvc/Property/PropertyMappingConfigurationTest.php
typo3/sysext/form/Tests/Unit/Service/TranslationServiceTest.php
typo3/sysext/frontend/Tests/Functional/Controller/TypoScriptFrontendControllerTest.php
typo3/sysext/frontend/Tests/Unit/Authentication/FrontendUserAuthenticationTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/CaseContentObjectTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/FilesContentObjectTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/FluidTemplateContentObjectTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/Menu/AbstractMenuContentObjectTest.php
typo3/sysext/frontend/Tests/Unit/Controller/ErrorControllerTest.php
typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php
typo3/sysext/frontend/Tests/Unit/Page/PageGeneratorTest.php
typo3/sysext/frontend/Tests/Unit/Plugin/AbstractPluginTest.php
typo3/sysext/frontend/Tests/Unit/Typolink/AbstractTypolinkBuilderTest.php
typo3/sysext/indexed_search/Tests/Unit/Example/PluginHookTest.php
typo3/sysext/indexed_search/Tests/Unit/IndexerTest.php
typo3/sysext/install/Tests/Unit/Service/CoreVersionServiceTest.php
typo3/sysext/install/Tests/Unit/Updates/Compatibility7ExtractionUpdateTest.php
typo3/sysext/install/Tests/UnitDeprecated/Service/CoreVersionServiceTest.php
typo3/sysext/redirects/Tests/Unit/Service/RedirectServiceTest.php
typo3/sysext/rsaauth/Tests/Unit/Backend/CommandLineBackendTest.php
typo3/sysext/rsaauth/Tests/Unit/Backend/PhpBackendTest.php
typo3/sysext/scheduler/Tests/Unit/Task/CachingFrameworkGarbageCollectionTest.php
typo3/sysext/workspaces/Tests/Unit/Controller/Remote/RemoteServerTest.php