Updated phpunit-bridge recipe.

This commit is contained in:
Jan Böhmer 2020-05-10 17:11:21 +02:00
parent 680297320b
commit a12802c1ae
3 changed files with 17 additions and 7 deletions

View file

@ -5,13 +5,14 @@
xsi:noNamespaceSchemaLocation="bin/.phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="config/bootstrap.php"
bootstrap="tests/bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="7.5" />
</php>
<testsuites>
@ -21,8 +22,8 @@
</testsuites>
<filter>
<whitelist>
<directory>src</directory>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
@ -32,6 +33,5 @@
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
<listener class="Symfony\Bridge\PhpUnit\CoverageListener" />
</listeners>
</phpunit>

View file

@ -637,14 +637,13 @@
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "170be6250b77b421f02e986e2853df86c7bd6516"
"ref": "6d0e35f749d5f4bfe1f011762875275cd3f9874f"
},
"files": [
"./.env.test",
"./bin/phpunit",
"./config/bootstrap.php",
"./phpunit.xml.dist",
"./tests/.gitignore"
"./tests/bootstrap.php"
]
},
"symfony/polyfill-ctype": {

11
tests/bootstrap.php Normal file
View file

@ -0,0 +1,11 @@
<?php
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
require dirname(__DIR__).'/config/bootstrap.php';
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
}