mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 16:44:04 +00:00
Manually register the bootstrapper as singleton
Without this, the bootstrapper doesn't respect the config. Even after setting the config to 'central', `null` (Laravel default) would be retrieved in the bootstrapper using `$this->config->get(...)`
This commit is contained in:
parent
16f56958eb
commit
a0a164ffe7
1 changed files with 2 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ use Stancl\Tenancy\Bootstrappers\BroadcastingConfigBootstrapper;
|
||||||
use Stancl\Tenancy\Bootstrappers\BroadcastChannelPrefixBootstrapper;
|
use Stancl\Tenancy\Bootstrappers\BroadcastChannelPrefixBootstrapper;
|
||||||
use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper;
|
use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper;
|
||||||
use function Stancl\Tenancy\Tests\pest;
|
use function Stancl\Tenancy\Tests\pest;
|
||||||
|
use Stancl\Tenancy\Bootstrappers\DatabaseCacheBootstrapper;
|
||||||
|
|
||||||
abstract class TestCase extends \Orchestra\Testbench\TestCase
|
abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
{
|
{
|
||||||
|
|
@ -180,6 +181,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
// to manually register bootstrappers as singletons here.
|
// to manually register bootstrappers as singletons here.
|
||||||
$app->singleton(RedisTenancyBootstrapper::class);
|
$app->singleton(RedisTenancyBootstrapper::class);
|
||||||
$app->singleton(CacheTenancyBootstrapper::class);
|
$app->singleton(CacheTenancyBootstrapper::class);
|
||||||
|
$app->singleton(DatabaseCacheBootstrapper::class);
|
||||||
$app->singleton(BroadcastingConfigBootstrapper::class);
|
$app->singleton(BroadcastingConfigBootstrapper::class);
|
||||||
$app->singleton(BroadcastChannelPrefixBootstrapper::class);
|
$app->singleton(BroadcastChannelPrefixBootstrapper::class);
|
||||||
$app->singleton(PostgresRLSBootstrapper::class);
|
$app->singleton(PostgresRLSBootstrapper::class);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue