<?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>
        <!-- Migration tests roll the schema back and replay it, which is DDL:
             MySQL commits it implicitly, so RefreshDatabase's wrapping
             transaction cannot undo it and a failure mid-test would leave the
             shared test database half-migrated. This suite runs on
             DatabaseMigrations instead (see tests/Pest.php) and is declared
             LAST so its teardown rollback cannot strand a later suite.
             That guarantee is "declared order, single process": PHPUnit runs
             testsuites in the order written here, one after another. Do NOT
             turn on parallel testing (the artisan test "parallel" flag) —
             separate processes would run this suite's schema rollbacks
             alongside the other suites' queries against the one shared test
             database. -->
        <testsuite name="Migration">
            <directory>tests/Migration</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"/>
        <!-- Tests run against MySQL 8 (same engine as production), not sqlite :memory:.
             Host/user/password come from .env; only the database name is forced here. -->
        <env name="DB_CONNECTION" value="mysql"/>
        <env name="DB_DATABASE" value="nrems_html_test"/>
        <env name="DB_URL" value=""/>
        <env name="MAIL_MAILER" value="array"/>
        <env name="QUEUE_CONNECTION" value="sync"/>
        <env name="SESSION_DRIVER" value="array"/>
        <env name="PULSE_ENABLED" value="false"/>
        <env name="TELESCOPE_ENABLED" value="false"/>
        <env name="NIGHTWATCH_ENABLED" value="false"/>
    </php>
</phpunit>
