<?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>
        <testsuite name="Architecture">
            <directory>tests/Architecture</directory>
        </testsuite>
        <testsuite name="Concurrency">
            <directory>tests/Concurrency</directory>
        </testsuite>
        <testsuite name="Operations">
            <directory>tests/Operations</directory>
        </testsuite>
        <testsuite name="Performance">
            <directory>tests/Performance</directory>
        </testsuite>
    </testsuites>
    <source>
        <include>
            <directory>app</directory>
        </include>
    </source>
    <php>
        <env name="APP_ENV" value="testing"/>
        <!-- Stage 2 tenancy: platform host = APP_URL host (+ localhost);
             organizations get "<subdomain>.<base>" for these bases. -->
        <env name="APP_URL" value="http://kopeza.test"/>
        <env name="TENANCY_PLATFORM_HOSTS" value="localhost,127.0.0.1"/>
        <env name="TENANCY_SUBDOMAIN_BASES" value="kopeza.test,localhost,example.test"/>
        <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"/>
        <env name="BADGE_TTL_SECONDS" value="0"/>
        <!-- The migrations use MySQL-specific SQL (UPDATE ... JOIN), so the
             suite runs on a dedicated MySQL/MariaDB database. Create it once:
             CREATE DATABASE msdsaccos1_test;  Host/user/password come from .env. -->
        <env name="DB_CONNECTION" value="mysql"/>
        <env name="DB_DATABASE" value="msdsaccos1_test"/>
        <env name="DB_URL" value=""/>
        <env name="MAIL_MAILER" value="array"/>
        <env name="QUEUE_CONNECTION" value="sync"/>
        <!-- Stage 03B: onboarding notices are dispatched explicitly in the tests that check them. -->
        <env name="ONBOARDING_NOTIFY_ON_COMMIT" value="false"/>
        <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>
