From ff0a35d83364eb7733c7569bcf0fade9fcd89adf Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Mon, 31 Oct 2016 10:23:37 +0100 Subject: [PATCH] Simplify ProtocolStreamWriterTest --- tests/ProtocolStreamWriterTest.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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);