1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 09:54:05 +00:00
This commit is contained in:
Samuel Štancl 2019-02-27 18:00:00 +01:00
parent d527191b89
commit 265216f7dc
4 changed files with 22 additions and 7 deletions

View file

@ -48,7 +48,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
protected function getEnvironmentSetUp($app)
{
if (file_exists(__DIR__ . '/../.env')) {
\Dotenv\Dotenv::create(__DIR__ . '/..')->load();
$this->loadDotEnv();
}
$app['config']->set([
@ -75,6 +75,15 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
]);
}
protected function loadDotEnv()
{
if (app()::VERSION > '5.8.0') {
\Dotenv\Dotenv::create(__DIR__ . '/..')->load();
} else {
(new \Dotenv\Dotenv(__DIR__ . '/..'))->load();
}
}
protected function getPackageProviders($app)
{
return [\Stancl\Tenancy\TenancyServiceProvider::class];