Skip to content

Commit

Permalink
Merge pull request #82 from clue-labs/unhandled-rejections
Browse files Browse the repository at this point in the history
Update test suite to avoid unhandled promise rejections
  • Loading branch information
SimonFrings authored Jul 10, 2023
2 parents 0ecc37a + 2e8e342 commit 9340132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react/event-loop": "^1.2",
"react/http": "^1.8",
"react/promise": "^3 || ^2.0 || ^1.1",
"react/promise-stream": "^1.4",
"react/promise-stream": "^1.6",
"react/socket": "^1.12",
"react/stream": "^1.2",
"rize/uri-template": "^0.3"
Expand Down
3 changes: 3 additions & 0 deletions tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Clue\React\Docker\Client;
use Psr\Http\Message\ServerRequestInterface;
use React\Http\Message\Response;
use React\Promise\Deferred;

class IntegrationTest extends TestCase
Expand All @@ -26,6 +27,7 @@ public function testPingCtorWithExplicitUnixUrlSendsRequestToGivenUnixSocket()
$deferred = new Deferred();
$http = new \React\Http\HttpServer(function (ServerRequestInterface $request) use ($deferred) {
$deferred->resolve($request->getRequestTarget());
return Response::plaintext('OK');
});

$http->listen($socket);
Expand All @@ -46,6 +48,7 @@ public function testPingCtorWithExplicitHttpUrlSendsRequestToGivenHttpUrlWithBas
$deferred = new Deferred();
$http = new \React\Http\HttpServer(function (ServerRequestInterface $request) use ($deferred) {
$deferred->resolve($request->getRequestTarget());
return Response::plaintext('OK');
});

$socket = new \React\Socket\SocketServer('127.0.0.1:0');
Expand Down

0 comments on commit 9340132

Please sign in to comment.