Skip to content

Commit d34b79c

Browse files
committed
Improve fiber tests to avoid now unneeded await() calls
1 parent f61d0e3 commit d34b79c

2 files changed

Lines changed: 0 additions & 15 deletions

File tree

tests/AppTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -877,11 +877,6 @@ public function testHandleRequestWithMatchingRouteReturnsPromiseResolvingWithRes
877877
"OK\n"
878878
));
879879

880-
// await next tick: https://github.com/reactphp/async/issues/27
881-
await(new Promise(function ($resolve) {
882-
Loop::futureTick($resolve);
883-
}));
884-
885880
/** @var ResponseInterface $response */
886881
$this->assertInstanceOf(ResponseInterface::class, $response);
887882
$this->assertEquals(200, $response->getStatusCode());
@@ -1152,11 +1147,6 @@ public function testHandleRequestWithMatchingRouteReturnsPromiseWhichFulfillsWit
11521147

11531148
$deferred->reject($exception);
11541149

1155-
// await next tick: https://github.com/reactphp/async/issues/27
1156-
await(new Promise(function ($resolve) {
1157-
Loop::futureTick($resolve);
1158-
}));
1159-
11601150
/** @var ResponseInterface $response */
11611151
$this->assertInstanceOf(ResponseInterface::class, $response);
11621152
$this->assertEquals(500, $response->getStatusCode());

tests/FiberHandlerTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,6 @@ public function testInvokeWithHandlerReturningResponseAfterAwaitingPendingPromis
157157

158158
$deferred->resolve($response);
159159

160-
// await next tick: https://github.com/reactphp/async/issues/27
161-
await(new Promise(function ($resolve) {
162-
Loop::futureTick($resolve);
163-
}));
164-
165160
$this->assertSame($response, $ret);
166161
}
167162
}

0 commit comments

Comments
 (0)