@@ -23,10 +23,6 @@ public function getPromiseTestAdapter(callable $canceller = null)
23
23
/** @test */
24
24
public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithException ()
25
25
{
26
- if ($ this ->getTestResultObject ()->getCollectCodeCoverageInformation () === true ) {
27
- $ this ->markTestSkipped ('This test has memory leaks when code coverage is collected ' );
28
- }
29
-
30
26
gc_collect_cycles ();
31
27
$ deferred = new Deferred (function ($ resolve , $ reject ) {
32
28
$ reject (new \Exception ('foo ' ));
@@ -40,11 +36,9 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithEx
40
36
/** @test */
41
37
public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException ()
42
38
{
43
- if ($ this ->getTestResultObject ()->getCollectCodeCoverageInformation () === true ) {
44
- $ this ->markTestSkipped ('This test has memory leaks when code coverage is collected ' );
45
- }
46
-
47
39
gc_collect_cycles ();
40
+ gc_collect_cycles (); // clear twice to avoid leftovers in PHP 7.4 with ext-debug and code coverage turned on
41
+
48
42
$ deferred = new Deferred (function ($ resolve , $ reject ) {
49
43
$ reject (new \Exception ('foo ' ));
50
44
});
@@ -57,11 +51,9 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejects
57
51
/** @test */
58
52
public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndExplicitlyRejectWithException ()
59
53
{
60
- if ($ this ->getTestResultObject ()->getCollectCodeCoverageInformation () === true ) {
61
- $ this ->markTestSkipped ('This test has memory leaks when code coverage is collected ' );
62
- }
63
-
64
54
gc_collect_cycles ();
55
+ gc_collect_cycles (); // clear twice to avoid leftovers in PHP 7.4 with ext-debug and code coverage turned on
56
+
65
57
$ deferred = new Deferred (function () use (&$ deferred ) { });
66
58
$ deferred ->reject (new \Exception ('foo ' ));
67
59
unset($ deferred );
0 commit comments