<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
         bootstrap="tests/bootstrap.php"
         colors="true"
         cacheDirectory=".phpunit.cache"
         executionOrder="depends,defects"
         requireCoverageMetadata="true"
         beStrictAboutCoverageMetadata="true"
         beStrictAboutOutputDuringTests="true"
         failOnRisky="true"
         failOnWarning="true">
    
    <testsuites>
        <testsuite name="Unit">
            <directory>tests/Unit</directory>
        </testsuite>
        <testsuite name="Integration">
            <directory>tests/Integration</directory>
        </testsuite>
        <testsuite name="Security">
            <directory>tests/Security</directory>
        </testsuite>
        <testsuite name="Performance">
            <directory>tests/Performance</directory>
        </testsuite>
    </testsuites>

    <source>
        <include>
            <directory>f_core</directory>
            <directory>f_modules</directory>
        </include>
        <exclude>
            <directory>f_core/f_classes/class_adodb</directory>
            <directory>f_core/f_classes/class_smarty</directory>
            <directory>vendor</directory>
        </exclude>
    </source>

    <coverage>
        <report>
            <html outputDirectory="tests/coverage/html"/>
            <clover outputFile="tests/coverage/clover.xml"/>
            <text outputFile="tests/coverage/coverage.txt"/>
        </report>
    </coverage>

    <php>
        <env name="APP_ENV" value="testing"/>
        <env name="DB_HOST" value="test-db"/>
        <env name="DB_NAME" value="easystream_test"/>
        <env name="DB_USER" value="test"/>
        <env name="DB_PASS" value="test"/>
        <env name="REDIS_HOST" value="test-redis"/>
        <env name="TESTING" value="true"/>
    </php>

    <logging>
        <junit outputFile="tests/results/junit.xml"/>
    </logging>
</phpunit>