1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-06 23:44:03 +00:00
tenancy/tests/Etc/TestingBroadcaster.php
lukinovec 7d749eb592 BroadcastingConfigBootstrapper: test mapping credentials
Test that BroadcastingConfigBootstrapper correctly maps tenant properties to broadcasting config/credentials, and that the credentials don't leak when switching contexts. Also add the `$config` property to `TestingBroadcaster` so that we can access the credentials used by the broadcaster.
2026-03-31 15:32:45 +02:00

26 lines
528 B
PHP

<?php
namespace Stancl\Tenancy\Tests\Etc;
use Illuminate\Broadcasting\Broadcasters\Broadcaster;
class TestingBroadcaster extends Broadcaster {
public function __construct(
public string $message = 'nothing',
public array $config = [],
) {}
public function auth($request)
{
return true;
}
public function validAuthenticationResponse($request, $result)
{
return true;
}
public function broadcast(array $channels, $event, array $payload = [])
{
}
}