Skip to content

Commit fc74157

Browse files
committed
minor #573 Override DATABASE_URL by setting default parameter's value (voronkovich)
This PR was merged into the master branch. Discussion ---------- Override DATABASE_URL by setting default parameter's value This approach is more flexible than we used in #572 Commits ------- 9ea6fc8 Override DATABASE_URL by setting default parameter's value
2 parents 43a9f2d + 9ea6fc8 commit fc74157

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/config/config_test.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
imports:
22
- { resource: config_dev.yml }
33

4+
parameters:
5+
# It's recommended to use a separate database for tests. This allows to have a
6+
# fixed and known set of data fixtures, it simplifies the code of tests and it
7+
# makes them more robust.
8+
# In this case we just need to define a different path for the application database.
9+
env(DATABASE_URL): 'sqlite:///%kernel.project_dir%/var/data/blog_test.sqlite'
10+
411
framework:
512
test: ~
613
session:

phpunit.xml.dist

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<php>
1111
<ini name="error_reporting" value="-1" />
1212
<server name="KERNEL_DIR" value="app/" />
13-
<env name="DATABASE_URL" value="sqlite:///var/data/blog_test.sqlite"/>
1413
</php>
1514

1615
<testsuites>

0 commit comments

Comments
 (0)