diff --git a/.travis.yml b/.travis.yml index f1d2fa1..9bc9e12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 - hhvm # ignore errors, see below # lock distro so new future defaults will not break the build diff --git a/composer.json b/composer.json index d2aec73..7fe0bc3 100644 --- a/composer.json +++ b/composer.json @@ -19,13 +19,13 @@ }, "require": { "php": ">=5.3", - "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6", "react/promise": "^2.1 || ^1.2" }, "require-dev": { "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3", "react/promise-timer": "^1.0", "clue/block-react": "^1.0", - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f373698..a40caa1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,7 +7,7 @@ convertWarningsToExceptions="true" > - + ./tests/ diff --git a/tests/UnwrapWritableTest.php b/tests/UnwrapWritableTest.php index ec120e7..ffa115a 100644 --- a/tests/UnwrapWritableTest.php +++ b/tests/UnwrapWritableTest.php @@ -318,24 +318,20 @@ public function testClosingStreamWillCloseInputStream() public function testClosingStreamWillCloseStreamIfItIgnoredCancellationAndResolvesLater() { - $this->markTestIncomplete(); - $input = new ThroughStream(); + $input->on('close', $this->expectCallableOnce()); - $loop = $this->loop; - $promise = new Promise\Promise(function ($resolve) use ($loop, $input) { - $loop->addTimer(0.001, function () use ($resolve, $input) { - $resolve($input); - }); - }); + $deferred = new Deferred(); - $stream = Stream\unwrapReadable($promise); + $stream = Stream\unwrapReadable($deferred->promise()); $stream->on('close', $this->expectCallableOnce()); $stream->close(); - Block\await($promise, $this->loop); + $this->assertTrue($input->isReadable()); + + $deferred->resolve($input); $this->assertFalse($input->isReadable()); }