Skip to content

Commit af7fa59

Browse files
WyriHaximusclue
authored andcommitted
Test PHP 7.4 on Travis
1 parent 8d05ffd commit af7fa59

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ php:
44
- 7.1
55
- 7.2
66
- 7.3
7+
- 7.4
78
- nightly # ignore errors, see below
89

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

1920
script:
21+
- ./vendor/bin/phpunit -v
2022
- ./vendor/bin/phpunit -v --coverage-text --coverage-clover=./build/logs/clover.xml
2123

2224
after_script:

tests/DeferredTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ 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+
2630
gc_collect_cycles();
2731
$deferred = new Deferred(function ($resolve, $reject) {
2832
$reject(new \Exception('foo'));
@@ -36,6 +40,10 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithEx
3640
/** @test */
3741
public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException()
3842
{
43+
if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
44+
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
45+
}
46+
3947
gc_collect_cycles();
4048
$deferred = new Deferred(function ($resolve, $reject) {
4149
$reject(new \Exception('foo'));
@@ -49,6 +57,10 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejects
4957
/** @test */
5058
public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndExplicitlyRejectWithException()
5159
{
60+
if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
61+
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
62+
}
63+
5264
gc_collect_cycles();
5365
$deferred = new Deferred(function () use (&$deferred) { });
5466
$deferred->reject(new \Exception('foo'));

0 commit comments

Comments
 (0)