<?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"/>
        <!-- Clean root URL for tests; the real APP_URL has a /backend/public subpath
             that would otherwise be prepended to test request paths. -->
        <env name="APP_URL" value="http://localhost"/>
        <env name="APP_MAINTENANCE_DRIVER" value="file"/>
        <env name="BCRYPT_ROUNDS" value="4"/>
        <env name="CACHE_STORE" value="array"/>
        <!-- Tests run against an isolated MySQL database, never the dev/prod DB.
             Create it once (CREATE DATABASE stepup_test_db) then migrate it with
             DB_DATABASE set to stepup_test_db before running the suite. -->
        <env name="DB_DATABASE" value="stepup_test_db"/>
        <!-- Point the "legacy" backup connection at a database that DOES NOT
             EXIST during automated tests. Any test that inadvertently calls
             DB::connection('legacy')->... will fail loudly with 1049 instead
             of silently reading real historical data. The local dev .env can
             point this at a real backup DB (e.g. stepupolddb) for the admin
             backup-import tool without weakening test isolation. -->
        <env name="LEGACY_DB_DATABASE" value="stepup_e2e_legacy_unused"/>
        <env name="API_KEY" value="test-api-key"/>
        <env name="MAIL_MAILER" value="array"/>
        <env name="PULSE_ENABLED" value="false"/>
        <env name="QUEUE_CONNECTION" value="sync"/>
        <env name="SESSION_DRIVER" value="array"/>
        <env name="TELESCOPE_ENABLED" value="false"/>
    </php>
</phpunit>
