Skip to content

Commit

Permalink
Override DATABASE_URL by setting default parameter's value
Browse files Browse the repository at this point in the history
  • Loading branch information
voronkovich committed May 30, 2017
1 parent a99f756 commit 9ea6fc8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/config/config_test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
imports:
- { resource: config_dev.yml }

parameters:
# It's recommended to use a separate database for tests. This allows to have a
# fixed and known set of data fixtures, it simplifies the code of tests and it
# makes them more robust.
# In this case we just need to define a different path for the application database.
env(DATABASE_URL): 'sqlite:///%kernel.project_dir%/var/data/blog_test.sqlite'

framework:
test: ~
session:
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<php>
<ini name="error_reporting" value="-1" />
<server name="KERNEL_DIR" value="app/" />
<env name="DATABASE_URL" value="sqlite:///var/data/blog_test.sqlite"/>
</php>

<testsuites>
Expand Down

0 comments on commit 9ea6fc8

Please sign in to comment.