<?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"/>
        <!--
            The suite runs against a dedicated MySQL database rather than the
            Laravel default of SQLite in-memory.

            Tenant isolation is enforced partly by composite unique indexes such
            as (business_id, invoice_number) and partly by MySQL's strict SQL
            mode. SQLite silently ignores index semantics and coercion rules,
            so a suite running on SQLite can stay green while the production
            engine rejects or conflates real writes. Testing on the same engine
            that runs in production is the safer default.

            fsm_saas_test is a throwaway database. RefreshDatabase drops and
            rebuilds it on every run, which is why it must never be pointed at
            the development database.

            No credentials are declared here on purpose. This file is committed
            to version control, so DB_USERNAME and DB_PASSWORD are inherited
            from the local .env, which is git-ignored. Only the database name
            is overridden, because that is what must differ from development.
        -->
        <env name="DB_CONNECTION" value="mysql"/>
        <env name="DB_HOST" value="127.0.0.1"/>
        <env name="DB_PORT" value="3306"/>
        <env name="DB_DATABASE" value="fsm_saas_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="SMS_DRIVER" value="log"/>
        <env name="WHATSAPP_DRIVER" value="log"/>
        <env name="PAYMENT_DRIVER" value="log"/>
        <env name="ACCOUNTING_DRIVER" value="log"/>
        <env name="PULSE_ENABLED" value="false"/>
        <env name="TELESCOPE_ENABLED" value="false"/>
        <env name="NIGHTWATCH_ENABLED" value="false"/>
        <env name="APP_TIMEZONE" value="Africa/Accra"/>
        <env name="APP_CURRENCY" value="GHS"/>
    </php>
</phpunit>
