mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:34:04 +00:00
wip broadcasting test fixes
This commit is contained in:
parent
a37dc9b449
commit
a52efe5cf0
2 changed files with 7 additions and 3 deletions
|
|
@ -69,6 +69,8 @@
|
||||||
"docker-restart": "docker-compose down && docker-compose up -d",
|
"docker-restart": "docker-compose down && docker-compose up -d",
|
||||||
"docker-rebuild": "PHP_VERSION=8.3 docker-compose up -d --no-deps --build",
|
"docker-rebuild": "PHP_VERSION=8.3 docker-compose up -d --no-deps --build",
|
||||||
"docker-m1": "ln -s docker-compose-m1.override.yml docker-compose.override.yml",
|
"docker-m1": "ln -s docker-compose-m1.override.yml docker-compose.override.yml",
|
||||||
|
"testbench-unlink": "rm ./vendor/orchestra/testbench-core/laravel/vendor",
|
||||||
|
"testbench-link": "ln -s vendor ./vendor/orchestra/testbench-core/laravel/vendor",
|
||||||
"coverage": "open coverage/phpunit/html/index.html",
|
"coverage": "open coverage/phpunit/html/index.html",
|
||||||
"phpstan": "vendor/bin/phpstan",
|
"phpstan": "vendor/bin/phpstan",
|
||||||
"phpstan-pro": "vendor/bin/phpstan --pro",
|
"phpstan-pro": "vendor/bin/phpstan --pro",
|
||||||
|
|
|
||||||
|
|
@ -136,9 +136,11 @@ test('broadcasting channel helpers register channels correctly', function() {
|
||||||
|
|
||||||
// Tenant channel registered – its name is correctly prefixed ("{tenant}.user.{userId}")
|
// Tenant channel registered – its name is correctly prefixed ("{tenant}.user.{userId}")
|
||||||
$tenantChannelClosure = $getChannels()->first(fn ($closure, $name) => $name === "{tenant}.$channelName");
|
$tenantChannelClosure = $getChannels()->first(fn ($closure, $name) => $name === "{tenant}.$channelName");
|
||||||
expect($tenantChannelClosure)
|
expect($tenantChannelClosure)->toBe($centralChannelClosure);
|
||||||
->not()->toBeNull() // Channel registered
|
|
||||||
->not()->toBe($centralChannelClosure); // The tenant channel closure is different – after the auth user, it accepts the tenant ID
|
// todo: fix tests from below here as the closure is now NOT modified, the $tenant parameter is expected (when additional parameters are used) and kept
|
||||||
|
// and the universal_channel() helper was removed (get rid of tests related to testing the helper's behavior, but tests which use universal channels should
|
||||||
|
// be kept -- the two channels should just be registered by hand per docs instead of using the now removed helper)
|
||||||
|
|
||||||
// The tenant channels are prefixed with '{tenant}.'
|
// The tenant channels are prefixed with '{tenant}.'
|
||||||
// They accept the tenant key, but their closures only run in tenant context when tenancy is initialized
|
// They accept the tenant key, but their closures only run in tenant context when tenancy is initialized
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue