Skip to content

Commit

Permalink
IBX-1195: Added default value for DATABASE_URL in IbexaTestKernel (
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveb-p authored Oct 6, 2021
1 parent 484bde0 commit d1947f2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
use EzSystems\DoctrineSchema\Database\DbPlatform\SqliteDbPlatform;

return static function (ContainerConfigurator $container): void {
if (!isset($_ENV['DATABASE_URL'])) {
$_ENV['DATABASE_URL'] = 'sqlite://:memory:';
}

$platform = null;
if (substr(getenv('DATABASE_URL'), 0, strlen('sqlite://')) === 'sqlite://') {
if (substr($_ENV['DATABASE_URL'], 0, strlen('sqlite://')) === 'sqlite://') {
$platform = SqliteDbPlatform::class;
}

Expand Down

0 comments on commit d1947f2

Please sign in to comment.