[TASK] Allow private service container in tests
The private container now provides access to non-public services that have been at least once injected (and thus be considered as service during DI compilation phase). This may be used to provide dependencies to functional test setups where some dependencies needs to be mocked while other should receive the vanilla dependency the container would normally inject. A functional test case does implement the ContainerInterface now, allowing tests to access both public and private services. $this->getContainer() may still be used if the default container (delivering public services only) needs to be injected into a service. Related testing-framework pull request: https://github.com/TYPO3/testing-framework/pull/331 Commands executed: composer u typo3/testing-framework git grep -l "this->getContainer()->get(" | xargs sed -i 's/this->getContainer()->get(/this->get(/g' Resolves: #97032 Releases: main, 11.5 Change-Id: I5987d5244270a3e190c8721f6a8971c7fd1309ef Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73646 Tested-by:core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- composer.lock 5 additions, 4 deletionscomposer.lock
- typo3/sysext/backend/Tests/Functional/Backend/Shortcut/ShortcutRepositoryTest.php 3 additions, 3 deletions...ts/Functional/Backend/Shortcut/ShortcutRepositoryTest.php
- typo3/sysext/backend/Tests/Functional/Controller/MfaAjaxControllerTest.php 1 addition, 1 deletion...end/Tests/Functional/Controller/MfaAjaxControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/MfaConfigurationControllerTest.php 4 additions, 5 deletions.../Functional/Controller/MfaConfigurationControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/MfaControllerTest.php 6 additions, 9 deletions...backend/Tests/Functional/Controller/MfaControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/MfaSetupControllerTest.php 6 additions, 9 deletions...nd/Tests/Functional/Controller/MfaSetupControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/ResetPasswordControllerTest.php 8 additions, 22 deletions...sts/Functional/Controller/ResetPasswordControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/ShortcutControllerTest.php 3 additions, 3 deletions...nd/Tests/Functional/Controller/ShortcutControllerTest.php
- typo3/sysext/backend/Tests/Functional/Middleware/BackendModuleValidatorTest.php 8 additions, 8 deletions...ests/Functional/Middleware/BackendModuleValidatorTest.php
- typo3/sysext/backend/Tests/Functional/Module/ModuleDataTest.php 1 addition, 1 deletion...sysext/backend/Tests/Functional/Module/ModuleDataTest.php
- typo3/sysext/backend/Tests/Functional/View/BackendViewFactoryTest.php 8 additions, 18 deletions.../backend/Tests/Functional/View/BackendViewFactoryTest.php
- typo3/sysext/backend/Tests/Functional/View/Drawing/BackendLayoutRendererTest.php 8 additions, 8 deletions...sts/Functional/View/Drawing/BackendLayoutRendererTest.php
- typo3/sysext/backend/Tests/Functional/ViewHelpers/Link/EditRecordViewHelperTest.php 6 additions, 6 deletions.../Functional/ViewHelpers/Link/EditRecordViewHelperTest.php
- typo3/sysext/backend/Tests/Functional/ViewHelpers/Link/NewRecordViewHelperTest.php 9 additions, 9 deletions...s/Functional/ViewHelpers/Link/NewRecordViewHelperTest.php
- typo3/sysext/backend/Tests/Functional/ViewHelpers/Mfa/IfHasStateViewHelperTest.php 2 additions, 2 deletions...s/Functional/ViewHelpers/Mfa/IfHasStateViewHelperTest.php
- typo3/sysext/backend/Tests/Functional/ViewHelpers/Uri/EditRecordViewHelperTest.php 6 additions, 6 deletions...s/Functional/ViewHelpers/Uri/EditRecordViewHelperTest.php
- typo3/sysext/backend/Tests/Functional/ViewHelpers/Uri/NewRecordViewHelperTest.php 9 additions, 9 deletions...ts/Functional/ViewHelpers/Uri/NewRecordViewHelperTest.php
- typo3/sysext/beuser/Tests/Functional/ViewHelpers/MfaStatusViewHelperTest.php 1 addition, 1 deletion.../Tests/Functional/ViewHelpers/MfaStatusViewHelperTest.php
- typo3/sysext/core/Tests/Functional/Authentication/Mfa/MfaProviderPropertyManagerTest.php 1 addition, 1 deletion...nal/Authentication/Mfa/MfaProviderPropertyManagerTest.php
- typo3/sysext/core/Tests/Functional/Authentication/Mfa/MfaProviderRegistryTest.php 1 addition, 1 deletion...Functional/Authentication/Mfa/MfaProviderRegistryTest.php
Please register or sign in to comment