23 lines
491 B
PHP
23 lines
491 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->wsHandler = app(HealthHandler::class);
|
|
|
|
$this->wsHandler->onOpen($connection);
|
|
|
|
$this->assertTrue(
|
|
Str::contains($connection->sentRawData[0], '{"ok":true}')
|
|
);
|
|
}
|
|
}
|