Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test PHP 7.4 on Travis CI #40

Closed
wants to merge 3 commits into from
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
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ php:
- 7.1
- 7.2
- 7.3
- 7.4
- hhvm # ignore errors, see below

# lock distro so new future defaults will not break the build
Expand All @@ -25,4 +26,5 @@ install:
- composer install --no-interaction

script:
- vendor/bin/phpunit --coverage-text
- ./vendor/bin/phpunit -v
- ./vendor/bin/phpunit -v --coverage-text --coverage-clover=./build/logs/clover.xml
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"react/promise": "^2.7.0 || ^1.2.1"
},
"require-dev": {
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
"phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35"
}
}
8 changes: 8 additions & 0 deletions tests/FunctionRejectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public function testWaitingForPromiseToRejectDoesNotLeaveGarbageCycles()
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = Timer\reject(0.01, $this->loop);
Expand All @@ -68,6 +72,10 @@ public function testCancellingPromiseDoesNotLeaveGarbageCycles()
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = Timer\reject(0.01, $this->loop);
Expand Down
8 changes: 8 additions & 0 deletions tests/FunctionResolveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public function testWaitingForPromiseToResolveDoesNotLeaveGarbageCycles()
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = Timer\resolve(0.01, $this->loop);
Expand All @@ -90,6 +94,10 @@ public function testCancellingPromiseDoesNotLeaveGarbageCycles()
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = Timer\resolve(0.01, $this->loop);
Expand Down
24 changes: 24 additions & 0 deletions tests/FunctionTimeoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ public function testWaitingForPromiseToResolveBeforeTimeoutDoesNotLeaveGarbageCy
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = Timer\resolve(0.01, $this->loop);
Expand All @@ -194,6 +198,10 @@ public function testWaitingForPromiseToRejectBeforeTimeoutDoesNotLeaveGarbageCyc
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = Timer\reject(0.01, $this->loop);
Expand All @@ -212,6 +220,10 @@ public function testWaitingForPromiseToTimeoutDoesNotLeaveGarbageCycles()
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = new \React\Promise\Promise(function () { }, function () {
Expand All @@ -232,6 +244,10 @@ public function testWaitingForPromiseToTimeoutWithoutCancellerDoesNotLeaveGarbag
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = new \React\Promise\Promise(function () { });
Expand All @@ -250,6 +266,10 @@ public function testWaitingForPromiseToTimeoutWithNoOpCancellerDoesNotLeaveGarba
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = new \React\Promise\Promise(function () { }, function () {
Expand All @@ -270,6 +290,10 @@ public function testCancellingPromiseDoesNotLeaveGarbageCycles()
$this->markTestSkipped('Not supported on legacy Promise v1 API');
}

if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
}

gc_collect_cycles();

$promise = new \React\Promise\Promise(function () { }, function () {
Expand Down