Skip to content

Commit 8c9bfae

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

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
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:

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)