Review main Merged

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

Benjamin Franzke CR +2 V +2 Easy +4 −5 updated 12/06/19, 22:08

Commit message

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().

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 1