mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 18:04:03 +00:00
Rewrite old tests
This commit is contained in:
parent
64383b4c56
commit
89936187ce
71 changed files with 698 additions and 3203 deletions
|
|
@ -21,11 +21,6 @@ class MySQLDatabaseManager implements TenantDatabaseManager, CanSetConnection
|
|||
$this->connection = $config->get('tenancy.database_manager_connections.mysql');
|
||||
}
|
||||
|
||||
public function getSeparator(): string
|
||||
{
|
||||
return 'database';
|
||||
}
|
||||
|
||||
protected function database(): Connection
|
||||
{
|
||||
return DB::connection($this->connection);
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@ class PostgreSQLDatabaseManager implements TenantDatabaseManager, CanSetConnecti
|
|||
$this->connection = $config->get('tenancy.database_manager_connections.pgsql');
|
||||
}
|
||||
|
||||
public function getSeparator(): string
|
||||
{
|
||||
return 'database';
|
||||
}
|
||||
|
||||
protected function database(): Connection
|
||||
{
|
||||
return DB::connection($this->connection);
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@ class PostgreSQLSchemaManager implements TenantDatabaseManager, CanSetConnection
|
|||
$this->connection = $config->get('tenancy.database_manager_connections.pgsql');
|
||||
}
|
||||
|
||||
public function getSeparator(): string
|
||||
{
|
||||
return 'schema';
|
||||
}
|
||||
|
||||
protected function database(): Connection
|
||||
{
|
||||
return DB::connection($this->connection);
|
||||
|
|
|
|||
|
|
@ -9,11 +9,6 @@ use Stancl\Tenancy\Contracts\TenantWithDatabase;
|
|||
|
||||
class SQLiteDatabaseManager implements TenantDatabaseManager
|
||||
{
|
||||
public function getSeparator(): string
|
||||
{
|
||||
return 'database';
|
||||
}
|
||||
|
||||
public function createDatabase(TenantWithDatabase $tenant): bool
|
||||
{
|
||||
try {
|
||||
|
|
@ -39,7 +34,7 @@ class SQLiteDatabaseManager implements TenantDatabaseManager
|
|||
|
||||
public function makeConnectionConfig(array $baseConfig, string $databaseName): array
|
||||
{
|
||||
$baseConfig['database'] = database_path($databaseName);;
|
||||
$baseConfig['database'] = database_path($databaseName);
|
||||
|
||||
return $baseConfig;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue