Allow to override .env files per env

This commit is contained in:
Nicolas Grekas
2018-11-09 14:22:38 +01:00
parent 5b3ce90950
commit 95bb54353e
22 changed files with 157 additions and 90 deletions
+4
View File
@@ -0,0 +1,4 @@
# define your env variables for the test env here
KERNEL_CLASS=App\\Kernel
APP_SECRET='s$cretf0rt3st'
SHELL_VERBOSITY=-1
+1
View File
@@ -1,5 +1,6 @@
{
"copy-from-recipe": {
".env.test": ".env.test",
"phpunit.xml.dist": "phpunit.xml.dist",
"tests/": "tests/"
},
+2 -8
View File
@@ -2,19 +2,13 @@
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.7/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
bootstrap="tests/bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="KERNEL_CLASS" value="App\Kernel" />
<env name="APP_ENV" value="test" />
<env name="APP_DEBUG" value="1" />
<env name="APP_SECRET" value="s$cretf0rt3st" />
<env name="SHELL_VERBOSITY" value="-1" />
<!-- define your env variables for the test env here -->
</php>
<testsuites>
+5
View File
@@ -0,0 +1,5 @@
<?php
require dirname(__DIR__).'/vendor/autoload.php';
App\Kernel::bootstrapEnv('test');