Move loading .env files to bootstrap.php

This commit is contained in:
Nicolas Grekas
2018-11-15 00:20:15 +01:00
parent 8f1a28ffc9
commit 7ff50214ee
29 changed files with 121 additions and 170 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
# define your env variables for the test env here
KERNEL_CLASS=App\\Kernel
KERNEL_CLASS='App\Kernel'
APP_SECRET='s$cretf0rt3st'
SHELL_VERBOSITY=-1
SYMFONY_DEPRECATIONS_HELPER=999999
+1
View File
@@ -2,6 +2,7 @@
"copy-from-recipe": {
".env.test": ".env.test",
"phpunit.xml.dist": "phpunit.xml.dist",
"src/": "%SRC_DIR%/",
"tests/": "tests/"
},
"gitignore": [
+2 -1
View File
@@ -5,10 +5,11 @@
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.5/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
bootstrap="src/.bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="APP_ENV" value="test" />
</php>
<testsuites>
+1
View File
@@ -0,0 +1 @@
../../../../symfony/framework-bundle/3.3/src/.bootstrap.php
-5
View File
@@ -1,5 +0,0 @@
<?php
require dirname(__DIR__).'/vendor/autoload.php';
App\Kernel::bootstrapEnv('test');