Resolve test env settings

This commit is contained in:
Mikołaj Król
2019-02-01 17:40:30 +01:00
parent 0d7dbeae42
commit 8a667f2564
2 changed files with 12 additions and 1 deletions

2
tests/Application/.env.test.dist Executable file → Normal file
View File

@@ -12,7 +12,7 @@ APP_SECRET=EDITME
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=mysql://root@127.0.0.1/sylius_%kernel.environment%?serverVersion=5.5
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db
###< doctrine/doctrine-bundle ###
###> symfony/swiftmailer-bundle ###

View File

@@ -0,0 +1,11 @@
parameters:
# Adds a fallback DATABASE_URL if the env var is not set.
# This allows you to run cache:warmup even if your
# environment variables are not available yet.
# You should not need to change this value.
env(DATABASE_URL): ''
doctrine:
dbal:
charset: UTF8
url: '%env(resolve:DATABASE_URL)%'