From 677b62cf05ff6e683973a8f831d7e929fe03baad Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Wed, 28 Sep 2022 14:54:08 +0500 Subject: [PATCH] Update TenantDatabaseManagerTest.php --- tests/TenantDatabaseManagerTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/TenantDatabaseManagerTest.php b/tests/TenantDatabaseManagerTest.php index 9b99acf5..8d2dde5f 100644 --- a/tests/TenantDatabaseManagerTest.php +++ b/tests/TenantDatabaseManagerTest.php @@ -99,21 +99,20 @@ test('the tenant connection is fully removed', function () { Event::listen(TenancyEnded::class, RevertToCentralContext::class); $tenant = Tenant::create(); - $tenantHostConnectionName = config('tenancy.database.tenant_host_connection_name'); - expect(array_keys(app('db')->getConnections()))->toBe(['central', $tenantHostConnectionName]); + expect(array_keys(app('db')->getConnections()))->toBe(['central', 'tenant_host_connection']); pest()->assertArrayNotHasKey('tenant', config('database.connections')); tenancy()->initialize($tenant); createUsersTable(); - expect(array_keys(app('db')->getConnections()))->toBe(['central', $tenantHostConnectionName, 'tenant']); + expect(array_keys(app('db')->getConnections()))->toBe(['central', 'tenant_host_connection', 'tenant']); pest()->assertArrayHasKey('tenant', config('database.connections')); tenancy()->end(); - expect(array_keys(app('db')->getConnections()))->toBe(['central', $tenantHostConnectionName]); + expect(array_keys(app('db')->getConnections()))->toBe(['central', 'tenant_host_connection']); expect(config('database.connections.tenant'))->toBeNull(); });