mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 15:54:03 +00:00
Make BroadcastTenancyBootstrapper a singleton in tests
This commit is contained in:
parent
52d3ebcff9
commit
2c6a568b5e
1 changed files with 10 additions and 7 deletions
|
|
@ -4,16 +4,17 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Tests;
|
namespace Stancl\Tenancy\Tests;
|
||||||
|
|
||||||
use Dotenv\Dotenv;
|
|
||||||
use Illuminate\Foundation\Application;
|
|
||||||
use Illuminate\Support\Facades\Redis;
|
|
||||||
use PDO;
|
use PDO;
|
||||||
|
use Dotenv\Dotenv;
|
||||||
|
use Stancl\Tenancy\Facades\Tenancy;
|
||||||
|
use Stancl\Tenancy\Tests\Etc\Tenant;
|
||||||
|
use Illuminate\Support\Facades\Redis;
|
||||||
|
use Illuminate\Foundation\Application;
|
||||||
|
use Stancl\Tenancy\Facades\GlobalCache;
|
||||||
|
use Stancl\Tenancy\TenancyServiceProvider;
|
||||||
use Stancl\Tenancy\Bootstrappers\BatchTenancyBootstrapper;
|
use Stancl\Tenancy\Bootstrappers\BatchTenancyBootstrapper;
|
||||||
use Stancl\Tenancy\Bootstrappers\RedisTenancyBootstrapper;
|
use Stancl\Tenancy\Bootstrappers\RedisTenancyBootstrapper;
|
||||||
use Stancl\Tenancy\Facades\GlobalCache;
|
use Stancl\Tenancy\Bootstrappers\BroadcastTenancyBootstrapper;
|
||||||
use Stancl\Tenancy\Facades\Tenancy;
|
|
||||||
use Stancl\Tenancy\TenancyServiceProvider;
|
|
||||||
use Stancl\Tenancy\Tests\Etc\Tenant;
|
|
||||||
|
|
||||||
abstract class TestCase extends \Orchestra\Testbench\TestCase
|
abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
{
|
{
|
||||||
|
|
@ -104,6 +105,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
'--force' => true,
|
'--force' => true,
|
||||||
],
|
],
|
||||||
'tenancy.bootstrappers.redis' => RedisTenancyBootstrapper::class, // todo1 change this to []? two tests in TenantDatabaseManagerTest are failing with that
|
'tenancy.bootstrappers.redis' => RedisTenancyBootstrapper::class, // todo1 change this to []? two tests in TenantDatabaseManagerTest are failing with that
|
||||||
|
'tenancy.bootstrappers.broadcast' => BroadcastTenancyBootstrapper::class, // todo1 change this to []? two tests in TenantDatabaseManagerTest are failing with that
|
||||||
'queue.connections.central' => [
|
'queue.connections.central' => [
|
||||||
'driver' => 'sync',
|
'driver' => 'sync',
|
||||||
'central' => true,
|
'central' => true,
|
||||||
|
|
@ -113,6 +115,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$app->singleton(RedisTenancyBootstrapper::class); // todo (Samuel) use proper approach eg config for singleton registration
|
$app->singleton(RedisTenancyBootstrapper::class); // todo (Samuel) use proper approach eg config for singleton registration
|
||||||
|
$app->singleton(BroadcastTenancyBootstrapper::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getPackageProviders($app)
|
protected function getPackageProviders($app)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue