1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 02:54:03 +00:00

Minor tweaks

This commit is contained in:
Samuel Štancl 2019-02-07 17:53:21 +01:00
parent 576ec1cf02
commit 7f0b2e1cd1
6 changed files with 12 additions and 15 deletions

View file

@ -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');

View file

@ -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:',
]);
}