diff --git a/tests/ProtocolStreamWriterTest.php b/tests/ProtocolStreamWriterTest.php index b481c3b..b67bdcb 100644 --- a/tests/ProtocolStreamWriterTest.php +++ b/tests/ProtocolStreamWriterTest.php @@ -23,13 +23,10 @@ class ProtocolStreamWriterTest extends TestCase $msgString = (string)$msg; $promise = $writer->write($msg); - $promise->then(function () { - Loop\stop(); - }, function () { - Loop\stop(); - }); - Loop\run(); + Loop\tick(); + + $promise->wait(); fclose($writeHandle);