mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 21:54:03 +00:00
test named
This commit is contained in:
parent
f2a253c40d
commit
e6d703eee4
2 changed files with 5 additions and 5 deletions
|
|
@ -150,11 +150,11 @@ class DatabaseConfig
|
||||||
public function purgeHostConnection(): void
|
public function purgeHostConnection(): void
|
||||||
{
|
{
|
||||||
$tenantHostConnectionName = $this->getTenantHostConnectionName();
|
$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]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ test('tenant database can be created and deleted on a foreign server', function
|
||||||
expect($manager->databaseExists($name))->toBeFalse();
|
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([
|
config([
|
||||||
'tenancy.database.managers.mysql' => PermissionControlledMySQLDatabaseManager::class,
|
'tenancy.database.managers.mysql' => PermissionControlledMySQLDatabaseManager::class,
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue