mohamedhekal / classbridge-testing
Pest testing helpers and assertions for ClassBridge without LiveKit
Package info
github.com/mohamedhekal/classbridge-testing
pkg:composer/mohamedhekal/classbridge-testing
v0.1.1
2026-07-16 17:15 UTC
Requires
- php: ^8.2
- illuminate/support: ^11.0|^12.0
- mohamedhekal/classbridge: ^0.1
Requires (Dev)
- laravel/pint: ^1.18
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/phpstan: ^2.0
README
Pest helpers and assertions for testing ClassBridge integrations without LiveKit credentials.
Installation
composer require --dev mohamedhekal/classbridge-testing
CI without LiveKit
Use the built-in fake driver from the core package for fast, deterministic tests:
CLASSBRIDGE_DRIVER=fake
Then assert classroom actions in your feature tests:
use Hekal\ClassBridge\Testing\ClassBridgeTestCase; use Hekal\ClassBridge\Enums\MediaType; class SessionModerationTest extends ClassBridgeTestCase { public function test_teacher_can_mute_student(): void { // ... exercise your application code ... $this->assertParticipantMuted('room-1', 'student-42', MediaType::Audio); $this->assertRoomCreated('session-1'); } }
Or with Pest, extend the package test case via uses():
uses(Hekal\ClassBridge\Testing\ClassBridgeTestCase::class);
The trait resolves the in-memory FakeClassroomDriver from ClassBridge and exposes assertion helpers via ClassBridgeFake.
License
MIT