diff --git a/composer.json b/composer.json index 1791d03..dd09938 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "clue/json-stream": "^0.1", "react/event-loop": "^1.2", "react/http": "^1.8", - "react/promise": "^3 || ^2.0 || ^1.1", + "react/promise": "^3.1 || ^2.11 || ^1.3", "react/promise-stream": "^1.6", "react/socket": "^1.12", "react/stream": "^1.2", diff --git a/tests/Io/StreamingParserTest.php b/tests/Io/StreamingParserTest.php index 7ab1784..1906e19 100644 --- a/tests/Io/StreamingParserTest.php +++ b/tests/Io/StreamingParserTest.php @@ -5,7 +5,6 @@ use Clue\React\Docker\Io\StreamingParser; use Clue\Tests\React\Docker\TestCase; use React\Promise; -use React\Promise\CancellablePromiseInterface; use React\Promise\Deferred; use React\Stream\ThroughStream; @@ -119,11 +118,10 @@ public function testDeferredCancelingPromiseWillCloseStream() $stream->expects($this->once())->method('isReadable')->willReturn(true); $promise = $this->parser->deferredStream($stream); - if (!($promise instanceof CancellablePromiseInterface)) { - $this->markTestSkipped('Requires Promise v2 API and has no effect on v1 API'); - } $stream->expects($this->once())->method('close'); + + assert(method_exists($promise, 'cancel')); $promise->cancel(); }