Without force="true", phpunit `<env>` only sets when the var is absent from $_ENV. Devs with DB_CONNECTION/DB_DATABASE in their local .env silently get those instead of sqlite/:memory:, leading to confusing 'no such table' errors when tests run against the wrong connection. force="true" makes the test config authoritative.
44 lines
1.7 KiB
XML
44 lines
1.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
|
bootstrap="vendor/autoload.php"
|
|
colors="true"
|
|
>
|
|
<testsuites>
|
|
<testsuite name="Unit">
|
|
<directory>tests/Unit</directory>
|
|
</testsuite>
|
|
<testsuite name="Feature">
|
|
<directory>tests/Feature</directory>
|
|
</testsuite>
|
|
<testsuite name="Arch">
|
|
<file>tests/ArchTest.php</file>
|
|
<directory>tests/Arch</directory>
|
|
</testsuite>
|
|
<testsuite name="Components">
|
|
<directory suffix=".test.php">resources/views</directory>
|
|
</testsuite>
|
|
</testsuites>
|
|
<source>
|
|
<include>
|
|
<directory>app</directory>
|
|
</include>
|
|
</source>
|
|
<php>
|
|
<env name="APP_ENV" value="testing" force="true"/>
|
|
<env name="APP_MAINTENANCE_DRIVER" value="file" force="true"/>
|
|
<env name="BCRYPT_ROUNDS" value="4" force="true"/>
|
|
<env name="BROADCAST_CONNECTION" value="null" force="true"/>
|
|
<env name="CACHE_STORE" value="array" force="true"/>
|
|
<env name="DB_CONNECTION" value="sqlite" force="true"/>
|
|
<env name="DB_DATABASE" value=":memory:" force="true"/>
|
|
<env name="DB_URL" value="" force="true"/>
|
|
<env name="MAIL_MAILER" value="array" force="true"/>
|
|
<env name="QUEUE_CONNECTION" value="sync" force="true"/>
|
|
<env name="SESSION_DRIVER" value="array" force="true"/>
|
|
<env name="PULSE_ENABLED" value="false" force="true"/>
|
|
<env name="TELESCOPE_ENABLED" value="false" force="true"/>
|
|
<env name="NIGHTWATCH_ENABLED" value="false" force="true"/>
|
|
</php>
|
|
</phpunit>
|