From 7dea2ddc0beda039c4a7b4944dc1833e097d0a4b Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 29 Jul 2024 19:02:50 +0200 Subject: [PATCH] [TASK] Enable PHPUnit garbage collector control (#1384) This is disabled by default and enabled with this change. This has the following effect: - Deactivate automatic garbage collection using gc_disable() before the first test is run - Trigger garbage collection using gc_collect_cycles() before the first test is run - Trigger garbage collection using gc_collect_cycles() after each n-th test - Trigger garbage collection after using gc_collect_cycles() after the last test was run - Activate automatic garbage collection using gc_enable() after the last test was run Resolves: #1328 --- Build/phpunit/FunctionalTests.xml | 1 + Build/phpunit/UnitTests.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/Build/phpunit/FunctionalTests.xml b/Build/phpunit/FunctionalTests.xml index f2da77f..de96bf7 100644 --- a/Build/phpunit/FunctionalTests.xml +++ b/Build/phpunit/FunctionalTests.xml @@ -7,6 +7,7 @@ bootstrap="../../.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php" cacheResult="false" colors="true" + controlGarbageCollector="true" convertDeprecationsToExceptions="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" diff --git a/Build/phpunit/UnitTests.xml b/Build/phpunit/UnitTests.xml index 0e1fa6c..bcc7c7a 100644 --- a/Build/phpunit/UnitTests.xml +++ b/Build/phpunit/UnitTests.xml @@ -7,6 +7,7 @@ bootstrap="../../.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php" cacheResult="false" colors="true" + controlGarbageCollector="true" convertDeprecationsToExceptions="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true"