mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 02:54:03 +00:00
Minor tweaks
This commit is contained in:
parent
576ec1cf02
commit
7f0b2e1cd1
6 changed files with 12 additions and 15 deletions
|
|
@ -24,10 +24,7 @@ class DatabaseCreationTest extends TestCase
|
|||
$this->markTestSkipped('As to not bloat your MySQL instance with test databases, this test is not run by default.');
|
||||
}
|
||||
|
||||
config()->set([
|
||||
'database.default' => 'mysql',
|
||||
'database.connections.mysql.database' => 'travis_tenancy',
|
||||
]);
|
||||
config()->set('database.default', 'mysql');
|
||||
|
||||
$db_name = 'testdatabase' . $this->randomString(10);
|
||||
app(DatabaseManager::class)->create($db_name, 'mysql');
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ class TestCase extends \Orchestra\Testbench\TestCase
|
|||
*/
|
||||
protected function getEnvironmentSetUp($app)
|
||||
{
|
||||
(new \Dotenv\Dotenv(__DIR__ . '/..'))->load();
|
||||
if (file_exists(__DIR__ . '/../.env')) {
|
||||
(new \Dotenv\Dotenv(__DIR__ . '/..'))->load();
|
||||
}
|
||||
|
||||
$app['config']->set([
|
||||
'database.redis.client' => 'phpredis',
|
||||
|
|
@ -47,6 +49,7 @@ class TestCase extends \Orchestra\Testbench\TestCase
|
|||
'prefix' => 'tenant',
|
||||
'suffix' => '.sqlite',
|
||||
],
|
||||
'database.connections.sqlite.database' => ':memory:',
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue