mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 21:54:03 +00:00
Improvements
This commit is contained in:
parent
09ba3fd0fa
commit
f2a253c40d
2 changed files with 5 additions and 3 deletions
|
|
@ -137,8 +137,8 @@ class DatabaseConfig
|
||||||
unset($config['password']);
|
unset($config['password']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($config)) {
|
if (! $config) {
|
||||||
$config = $templateConnection;
|
return $templateConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
return array_replace($templateConnection, $config);
|
return array_replace($templateConnection, $config);
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,9 @@ test('the tenant connection is fully removed', function () {
|
||||||
|
|
||||||
tenancy()->end();
|
tenancy()->end();
|
||||||
|
|
||||||
expect(array_keys(app('db')->getConnections()))->not()->toContain('tenant')
|
expect(array_keys(app('db')->getConnections()))
|
||||||
|
->toContain('central')
|
||||||
|
->not()->toContain('tenant')
|
||||||
->and(config('database.connections.tenant'))->toBeNull();
|
->and(config('database.connections.tenant'))->toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue