Bug #50812

Make sure in unit tests the singletons are backup at first

Added by Nicole Cordes almost 7 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
Start date:
2013-08-06
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If in unit tests the singleton management is changed there is a local copy of the initial stage. If the backup contains classes which were created during setup method after finishing the test the internal __destruct method is called. This is why it is necessary to store the singleton classes before any other initialization otherwise the construct function is not executed for other tests and properties are false or missing.

Associated revisions

Revision a079ad67 (diff)
Added by Nicole Cordes almost 7 years ago

[BUGFIX] Backup singletons in unit tests prior to other setUp operations

If the singleton management is changed in unit tests, a local copy of
the previous stage is done to re-construct this state in tearDown().
This has to be done before any other instantiation in setUp() is
initiated which might register additional singletons.

Resolves: #50812
Releases: 6.2, 6.1, 6.0
Change-Id: I7788a5788aca6777040b777aeceb0558f96022b2
Reviewed-on: https://review.typo3.org/22838
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

Revision 7263bcd2 (diff)
Added by Nicole Cordes almost 7 years ago

[BUGFIX] Backup singletons in unit tests prior to other setUp operations

If the singleton management is changed in unit tests, a local copy of
the previous stage is done to re-construct this state in tearDown().
This has to be done before any other instantiation in setUp() is
initiated which might register additional singletons.

Resolves: #50812
Releases: 6.2, 6.1, 6.0
Change-Id: I7788a5788aca6777040b777aeceb0558f96022b2
Reviewed-on: https://review.typo3.org/22899
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

Revision 647d0756 (diff)
Added by Nicole Cordes almost 7 years ago

[BUGFIX] Backup singletons in unit tests prior to other setUp operations

If the singleton management is changed in unit tests, a local copy of
the previous stage is done to re-construct this state in tearDown().
This has to be done before any other instantiation in setUp() is
initiated which might register additional singletons.

Resolves: #50812
Releases: 6.2, 6.1, 6.0
Change-Id: I7788a5788aca6777040b777aeceb0558f96022b2
Reviewed-on: https://review.typo3.org/22900
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

History

#1 Updated by Gerrit Code Review almost 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22838

#2 Updated by Gerrit Code Review almost 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22838

#3 Updated by Gerrit Code Review almost 7 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/22899

#4 Updated by Gerrit Code Review almost 7 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/22900

#5 Updated by Nicole Cordes almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF