mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-07 04:54:03 +00:00
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.
26 lines
528 B
PHP
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 = [])
|
|
{
|
|
}
|
|
}
|