@@ -23,10 +23,6 @@ public function getPromiseTestAdapter(callable $canceller = null)
2323 /** @test */
2424 public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithException ()
2525 {
26- if ($ this ->getTestResultObject ()->getCollectCodeCoverageInformation () === true ) {
27- $ this ->markTestSkipped ('This test has memory leaks when code coverage is collected ' );
28- }
29-
3026 gc_collect_cycles ();
3127 $ deferred = new Deferred (function ($ resolve , $ reject ) {
3228 $ reject (new \Exception ('foo ' ));
@@ -40,11 +36,9 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithEx
4036 /** @test */
4137 public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException ()
4238 {
43- if ($ this ->getTestResultObject ()->getCollectCodeCoverageInformation () === true ) {
44- $ this ->markTestSkipped ('This test has memory leaks when code coverage is collected ' );
45- }
46-
4739 gc_collect_cycles ();
40+ gc_collect_cycles (); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on
41+
4842 $ deferred = new Deferred (function ($ resolve , $ reject ) {
4943 $ reject (new \Exception ('foo ' ));
5044 });
@@ -57,11 +51,9 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejects
5751 /** @test */
5852 public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndExplicitlyRejectWithException ()
5953 {
60- if ($ this ->getTestResultObject ()->getCollectCodeCoverageInformation () === true ) {
61- $ this ->markTestSkipped ('This test has memory leaks when code coverage is collected ' );
62- }
63-
6454 gc_collect_cycles ();
55+ gc_collect_cycles (); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on
56+
6557 $ deferred = new Deferred (function () use (&$ deferred ) { });
6658 $ deferred ->reject (new \Exception ('foo ' ));
6759 unset($ deferred );
0 commit comments