Skip to content
Snippets Groups Projects
Commit 5263197e authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Andreas Fernandez
Browse files

[TASK] Do not set GeneralUtility::$container in unit tests

The GeneralUtility $container instance should only be set/used
in functional tests as we a) can not reset the instance (which
means other unit tests are affected) and b) should mock/inject
dependencies in unit tests.

TreeDataProviderFactoryTest is therefore changed to to use
GeneralUtility::addInstance() (which is intended for unit tests)
instead of GeneralUtility::setContainer().

Change-Id: I9fc0e76077cc1cc2a6935d025b97309efc315f4f
Releases: master
Resolves: #89890
Related: #89733
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62573


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarSusanne Moog <look@susi.dev>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent f305de58
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment