Some improvements
This commit is contained in:
1 parent
a914bd74fe
commit
729c0be834
16 files changed
+577
-36
No files matched your search
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Events\GameSnapshot;
|
||||
use App\Game\Room;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use Tests\TestCase;
|
||||
|
||||
final class GameSnapshotTest extends TestCase
|
||||
{
|
||||
#[Test]
|
||||
public function broadcast_payload_discloses_message_size_cap(): void
|
||||
{
|
||||
$room = new Room('test');
|
||||
|
||||
$payload = (new GameSnapshot($room, [], [], []))->broadcastWith();
|
||||
|
||||
$this->assertArrayHasKey('msgCap', $payload);
|
||||
$this->assertSame(
|
||||
(int) config('reverb.apps.apps.0.max_message_size', 0),
|
||||
$payload['msgCap'],
|
||||
'client debug HUD reports the same cap the Reverb server enforces',
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user