[TASK] Use real ObjectManager stubs in unit tests 57/59757/3
authorBenjamin Franzke <bfr@qbus.de>
Mon, 18 Feb 2019 07:12:15 +0000 (08:12 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 23 Feb 2019 16:39:30 +0000 (17:39 +0100)
commit7af4a9864081650c029fba7379ad74265cc51d82
tree4a65c3e6b1026bfb924cf5153ee0b0646789fd98
parent191d0bdb5e12e3d1f9736aeb0a999f5297ba2c87
[TASK] Use real ObjectManager stubs in unit tests

Prevent invocation of the constructor (which instantiates
an internal instance of the extbase container) and do not
mix usage of mocked and stubbed methods.

The mixture happened due to the usage of setMethods():
When specifing `setMethods(['get'])` all methods besides ->get()
are actually proxied to the real ObjectManager methods.

Releases: master, 9.5
Resolves: #87742
Change-Id: I817f8ee90d82f36b8117e873b5802e11f601384e
Reviewed-on: https://review.typo3.org/c/59757
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php
typo3/sysext/extensionmanager/Tests/Unit/Task/UpdateExtensionListTaskTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/ExtensionModelUtilityTest.php
typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionValidationServiceTest.php