mohamedhekal/classbridge-testing

Pest testing helpers and assertions for ClassBridge without LiveKit

Maintainers

Package info

github.com/mohamedhekal/classbridge-testing

pkg:composer/mohamedhekal/classbridge-testing

Transparency log

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.1 2026-07-16 17:15 UTC

This package is auto-updated.

Last update: 2026-07-16 17:21:56 UTC


README

CI Packagist License: MIT

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