<?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"
         failOnWarning="true"
         failOnRisky="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="CACHE_STORE" value="array"/>
        <!--
            Tests run against MySQL, not SQLite, so the schema we test is the schema we
            deploy. Later phases rely on MySQL-specific features (generated columns,
            JSON columns), and a SQLite test suite would silently pass while production
            broke. Create the database once:  CREATE DATABASE aumni_ams_test ...;
        -->
        <env name="DB_CONNECTION" value="mysql"/>
        <env name="DB_DATABASE" value="aumni_ams_test"/>
        <env name="DB_URL" value=""/>
        <env name="MAIL_MAILER" value="array"/>
        <env name="QUEUE_CONNECTION" value="sync"/>
        <!--
            The database session driver, as in production. The array driver
            would make the session table disappear, and with it the guarantee
            that disabling an account or resetting a password terminates that
            account's live sessions — which is exactly what needs testing.
        -->
        <env name="SESSION_DRIVER" value="database"/>
    </php>
</phpunit>
