Skip to content

Commit

Permalink
Use bootstrap.php for tests and environment-specific settings
Browse files Browse the repository at this point in the history
  • Loading branch information
yceruto authored and javiereguiluz committed Dec 13, 2018
1 parent 88a62b2 commit 3bbe083
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 29 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file will be loaded after .env file and override environment
# variables for your test environment.
DATABASE_URL=sqlite:///%kernel.project_dir%/data/database_test.sqlite
15 changes: 3 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
/var/*
!/var/cache
/var/cache/*
!var/cache/.gitkeep
!/var/data
!/var/log
/var/log/*
!var/log/.gitkeep
!/var/sessions
/var/sessions/*
!var/sessions/.gitkeep
/public/build/fonts/glyphicons-*
/public/build/images/glyphicons-*

###> symfony/framework-bundle ###
/.env
/.env.local
/.env.*.local
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###

Expand Down
18 changes: 1 addition & 17 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,13 @@
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
bootstrap="config/bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="KERNEL_CLASS" value="App\Kernel" />
<env name="SYMFONY_PHPUNIT_VERSION" value="7.1"/>
<!-- define your env variables for the test env here -->

<!-- ###+ doctrine/doctrine-bundle ### -->
<env name="DATABASE_URL" value="sqlite:///data/database_test.sqlite"/>
<!-- ###- doctrine/doctrine-bundle ### -->

<!-- ###+ symfony/swiftmailer-bundle ### -->
<env name="MAILER_URL" value="null://localhost"/>
<!-- ###- symfony/swiftmailer-bundle ### -->

<!-- ###+ symfony/framework-bundle ### -->
<env name="APP_ENV" value="test"/>
<env name="APP_DEBUG" value="1"/>
<env name="APP_SECRET" value="5a79a1c866efef9ca1800f971d689f3e"/>
<!-- env name="TRUSTED_PROXIES" value="127.0.0.1,127.0.0.2" -->
<!-- env name="TRUSTED_HOSTS" value="localhost,example.com" -->
<!-- ###- symfony/framework-bundle ### -->
</php>

<testsuites>
Expand Down

0 comments on commit 3bbe083

Please sign in to comment.