Skip to content

Commit

Permalink
[TASK] flushInternalRuntimeCaches() in unit test tearDown()
Browse files Browse the repository at this point in the history
  • Loading branch information
lolli42 committed Sep 1, 2018
1 parent bbe4f71 commit dfed706
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Classes/Core/Unit/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ abstract class UnitTestCase extends BaseTestCase
*/
protected function tearDown()
{
// Flush the two static $indpEnvCache and $idnaStringCache
// between test runs to prevent side effects from these caches.
GeneralUtility::flushInternalRuntimeCaches();

// Unset properties of test classes to safe memory
$reflection = new \ReflectionObject($this);
foreach ($reflection->getProperties() as $property) {
Expand Down

0 comments on commit dfed706

Please sign in to comment.