<?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>
    </testsuites>
    <source>
        <include>
            <directory>app</directory>
        </include>
    </source>
    <php>
        <env name="APP_ENV" value="testing"/>
        <env name="APP_MAINTENANCE_DRIVER" value="file"/>
        <env name="BCRYPT_ROUNDS" value="4"/>
        <env name="BROADCAST_CONNECTION" value="null"/>
        <env name="CACHE_STORE" value="array"/>
        <!--
            SQLite in memory by default: the suite runs in ~30s instead of ~5
            minutes, which is what keeps it worth running on every change.

            Before a release, run it against MySQL too — SQLite has no row
            locking, so the IP allocator's SELECT ... FOR UPDATE SKIP LOCKED
            is silently skipped there and only MySQL exercises it:

              DB_CONNECTION=mysql DB_DATABASE=zylovpn_test \
              DB_USERNAME=zylovpn DB_PASSWORD=... php artisan test

            Verified passing on MySQL 8.4.3 — 247 tests, 788 assertions.
        -->
        <env name="DB_CONNECTION" value="sqlite"/>
        <env name="DB_DATABASE" value=":memory:"/>
        <env name="DB_URL" value=""/>
        <env name="MAIL_MAILER" value="array"/>
        <env name="QUEUE_CONNECTION" value="sync"/>
        <!-- database, not array: session management and the guard column are
             product features, and testing them needs real session rows. -->
        <env name="SESSION_DRIVER" value="database"/>
        <env name="PULSE_ENABLED" value="false"/>
        <env name="TELESCOPE_ENABLED" value="false"/>
        <env name="NIGHTWATCH_ENABLED" value="false"/>
    </php>
</phpunit>
