laravel-websockets/tests/HealthTest.php

23 lines
497 B
PHP

<?php
namespace BlaxSoftware\LaravelWebSockets\Test;
use BlaxSoftware\LaravelWebSockets\Server\HealthHandler;
use Illuminate\Support\Str;
class HealthTest extends TestCase
{
public function test_health_handler()
{
$connection = $this->newConnection();
$this->pusherServer = app(HealthHandler::class);
$this->pusherServer->onOpen($connection);
$this->assertTrue(
Str::contains($connection->sentRawData[0], '{"ok":true}')
);
}
}