From d34b79c2b31fb02ec616f40cfa62c70eae84ba96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 17 Feb 2022 14:59:01 +0100 Subject: [PATCH] Improve fiber tests to avoid now unneeded `await()` calls --- tests/AppTest.php | 10 ---------- tests/FiberHandlerTest.php | 5 ----- 2 files changed, 15 deletions(-) diff --git a/tests/AppTest.php b/tests/AppTest.php index e527e02..efe0f53 100644 --- a/tests/AppTest.php +++ b/tests/AppTest.php @@ -877,11 +877,6 @@ public function testHandleRequestWithMatchingRouteReturnsPromiseResolvingWithRes "OK\n" )); - // await next tick: https://github.com/reactphp/async/issues/27 - await(new Promise(function ($resolve) { - Loop::futureTick($resolve); - })); - /** @var ResponseInterface $response */ $this->assertInstanceOf(ResponseInterface::class, $response); $this->assertEquals(200, $response->getStatusCode()); @@ -1152,11 +1147,6 @@ public function testHandleRequestWithMatchingRouteReturnsPromiseWhichFulfillsWit $deferred->reject($exception); - // await next tick: https://github.com/reactphp/async/issues/27 - await(new Promise(function ($resolve) { - Loop::futureTick($resolve); - })); - /** @var ResponseInterface $response */ $this->assertInstanceOf(ResponseInterface::class, $response); $this->assertEquals(500, $response->getStatusCode()); diff --git a/tests/FiberHandlerTest.php b/tests/FiberHandlerTest.php index d388eec..85edc4e 100644 --- a/tests/FiberHandlerTest.php +++ b/tests/FiberHandlerTest.php @@ -157,11 +157,6 @@ public function testInvokeWithHandlerReturningResponseAfterAwaitingPendingPromis $deferred->resolve($response); - // await next tick: https://github.com/reactphp/async/issues/27 - await(new Promise(function ($resolve) { - Loop::futureTick($resolve); - })); - $this->assertSame($response, $ret); } }