fix(tests): isolate databases in memory and reject persistent connections

This commit is contained in:
2026-09-14 12:35:34 -03:00
parent 28ab6c9ae4
commit 289ceba3af
8 changed files with 177 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
<?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"
bootstrap="tests/bootstrap.php"
colors="true"
>
<testsuites>
@@ -19,7 +19,9 @@
</source>
<php>
<env name="APP_ENV" value="testing" force="true"/>
<env name="DB_DATABASE" value="shopit_test" force="true"/>
<env name="DB_CONNECTION" value="sqlite" force="true"/>
<env name="DB_DATABASE" value=":memory:" force="true"/>
<env name="DB_URL" value="null" force="true"/>
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="APP_CONFIG_CACHE" value="bootstrap/cache/phpunit-config.php"/>
<env name="APP_EVENTS_CACHE" value="bootstrap/cache/phpunit-events.php"/>