1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 10:54:04 +00:00

test named

This commit is contained in:
Abrar Ahmad 2022-09-13 17:27:52 +05:00
parent f2a253c40d
commit e6d703eee4
2 changed files with 5 additions and 5 deletions

View file

@ -150,11 +150,11 @@ class DatabaseConfig
public function purgeHostConnection(): void
{
$tenantHostConnectionName = $this->getTenantHostConnectionName();
if (array_key_exists($tenantHostConnectionName, config('database.connections'))) {
DB::purge($tenantHostConnectionName);
}
config(["database.connections.{$tenantHostConnectionName}" => null]);
if (config("database.connections.{$tenantHostConnectionName}")) {
DB::purge($tenantHostConnectionName);
config(["database.connections.{$tenantHostConnectionName}" => null]);
}
}
/**

View file

@ -229,7 +229,7 @@ test('tenant database can be created and deleted on a foreign server', function
expect($manager->databaseExists($name))->toBeFalse();
});
test('using permission controller MySQL manager creates the database user', function () {
test('tenant database user can be created when using the permission controller MySQL manager', function () {
config([
'tenancy.database.managers.mysql' => PermissionControlledMySQLDatabaseManager::class,
]);