2020-09-10 19:59:26 +00:00
|
|
|
<?php
|
|
|
|
|
|
2025-01-16 07:54:02 +00:00
|
|
|
namespace BlaxSoftware\LaravelWebSockets\Test\Commands;
|
2020-09-10 19:59:26 +00:00
|
|
|
|
2025-01-16 07:54:02 +00:00
|
|
|
use BlaxSoftware\LaravelWebSockets\Test\TestCase;
|
2020-09-10 19:59:26 +00:00
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
|
use Illuminate\Support\InteractsWithTime;
|
|
|
|
|
|
|
|
|
|
class RestartServerTest extends TestCase
|
|
|
|
|
{
|
|
|
|
|
use InteractsWithTime;
|
|
|
|
|
|
|
|
|
|
public function test_it_can_broadcast_restart_signal()
|
|
|
|
|
{
|
|
|
|
|
$start = $this->currentTime();
|
|
|
|
|
|
|
|
|
|
$this->artisan('websockets:restart');
|
|
|
|
|
|
|
|
|
|
$this->assertGreaterThanOrEqual(
|
2025-01-16 07:54:02 +00:00
|
|
|
$start, Cache::get('blax:websockets:restart', 0)
|
2020-09-10 19:59:26 +00:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|