Skip to content

Commit f5b889d

Browse files
committed
Use pcov for code coverage
1 parent e7c043f commit f5b889d

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ matrix:
1515
- php: nightly
1616

1717
install:
18+
- phpenv config-rm xdebug.ini
19+
- pecl install pcov
1820
- composer install
1921

2022
script:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"php": ">=7.1.0"
1010
},
1111
"require-dev": {
12-
"phpunit/phpunit": "^7"
12+
"phpunit/phpunit": "^8"
1313
},
1414
"autoload": {
1515
"psr-4": {

tests/DeferredTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ 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-
}
26+
// if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
27+
// $this->markTestSkipped('This test has memory leaks when code coverage is collected');
28+
// }
2929

3030
gc_collect_cycles();
3131
$deferred = new Deferred(function ($resolve, $reject) {
@@ -40,9 +40,9 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithEx
4040
/** @test */
4141
public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException()
4242
{
43-
if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
44-
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
45-
}
43+
// if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
44+
// $this->markTestSkipped('This test has memory leaks when code coverage is collected');
45+
// }
4646

4747
gc_collect_cycles();
4848
$deferred = new Deferred(function ($resolve, $reject) {
@@ -57,9 +57,9 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejects
5757
/** @test */
5858
public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndExplicitlyRejectWithException()
5959
{
60-
if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
61-
$this->markTestSkipped('This test has memory leaks when code coverage is collected');
62-
}
60+
// if ($this->getTestResultObject()->getCollectCodeCoverageInformation() === true) {
61+
// $this->markTestSkipped('This test has memory leaks when code coverage is collected');
62+
// }
6363

6464
gc_collect_cycles();
6565
$deferred = new Deferred(function () use (&$deferred) { });

0 commit comments

Comments
 (0)