Updated test for the start command

This commit is contained in:
Alex Renoki 2020-08-18 23:09:12 +03:00
parent a2fc559e0b
commit fd82904a9e
1 changed files with 9 additions and 3 deletions

View File

@ -240,10 +240,16 @@ class StartWebSocketServer extends Command
$this->buildServer();
if (! $this->option('test')) {
/* 🛰 Start the server 🛰 */
$this->server->run();
// For testing, just boot up the server, run it
// but exit after the next tick.
if ($this->option('test')) {
$this->loop->futureTick(function () {
$this->loop->stop();
});
}
/* 🛰 Start the server 🛰 */
$this->server->run();
}
/**