Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ php:
- 7.1
- 7.2
- 7.3
- 7.4
- nightly # ignore errors, see below

# lock distro so new future defaults will not break the build
Expand All @@ -17,6 +18,7 @@ install:
- composer install

script:
- ./vendor/bin/phpunit -v
- ./vendor/bin/phpunit -v --coverage-text --coverage-clover=./build/logs/clover.xml

after_script:
Expand Down
12 changes: 12 additions & 0 deletions tests/DeferredTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public function getPromiseTestAdapter(callable $canceller = null)
/** @test */
public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithException()
{
if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();
$deferred = new Deferred(function ($resolve, $reject) {
$reject(new \Exception('foo'));
Expand All @@ -36,6 +40,10 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithEx
/** @test */
public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException()
{
if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();
$deferred = new Deferred(function ($resolve, $reject) {
$reject(new \Exception('foo'));
Expand All @@ -49,6 +57,10 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejects
/** @test */
public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndExplicitlyRejectWithException()
{
if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();
$deferred = new Deferred(function () use (&$deferred) { });
$deferred->reject(new \Exception('foo'));
Expand Down