laravel-websockets/tests/PingTest.php

18 lines
403 B
PHP
Raw Normal View History

2020-09-10 19:59:26 +00:00
<?php
2025-01-16 07:54:02 +00:00
namespace BlaxSoftware\LaravelWebSockets\Test;
2020-09-10 19:59:26 +00:00
class PingTest extends TestCase
{
public function test_ping_returns_pong()
{
$connection = $this->newActiveConnection(['public-channel']);
2025-01-18 16:06:52 +00:00
$message = new Mocks\Message(['event' => 'pusher.ping']);
2020-09-10 19:59:26 +00:00
$this->pusherServer->onMessage($connection, $message);
2025-01-18 16:06:52 +00:00
$connection->assertSentEvent('pusher.pong');
2020-09-10 19:59:26 +00:00
}
}