Skip to content
Snippets Groups Projects
Commit 6bfaefaf authored by Christian Kuhn's avatar Christian Kuhn Committed by Anja Leichsenring
Browse files

[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: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarJoerg Boesche <typo3@joergboesche.de>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 330a3d39
Showing
with 88 additions and 174 deletions
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