<?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"/>
        <!-- Weaker hashing: tests should not pay the price of 12 bcrypt rounds. -->
        <env name="BCRYPT_ROUNDS" value="4"/>
        <env name="BROADCAST_CONNECTION" value="null"/>
        <env name="CACHE_STORE" value="array"/>

        <!--
            Tests run against the separate MySQL database `zvonce_test`, never `zvonce`.
            Same engine as production (MySQL), so strict mode, column types and foreign
            keys break in a test rather than on the server — which SQLite would not catch.
            Username and password are taken from .env.
            Second guard: tests/TestCase.php aborts if the database name is not *_test.
        -->
        <env name="DB_CONNECTION" value="mysql"/>
        <env name="DB_DATABASE" value="zvonce_test"/>
        <env name="DB_URL" value=""/>

        <env name="MAIL_MAILER" value="array"/>
        <env name="QUEUE_CONNECTION" value="sync"/>
        <env name="SESSION_DRIVER" value="array"/>
    </php>
</phpunit>
