<?xml version="1.0" encoding="UTF-8"?>
<!--
  CE Online migration — PHPUnit configuration (Phase 3.1 task 10).

  Runs the custom-module test suite only. Core and contrib tests are out of scope.

  Usage (inside the DDEV web container):
    ddev exec vendor/bin/phpunit -c phpunit.xml.dist
    ddev exec vendor/bin/phpunit -c phpunit.xml.dist --testsuite=rules_behavior
    ddev exec vendor/bin/phpunit -c phpunit.xml.dist --filter=RB14

  At Phase 3.1 every RB-* test is deliberately INCOMPLETE. They encode the
  behaviour contract from RULES_BEHAVIOR_MAPPING.md before any implementation
  exists, so the contract cannot drift silently while the code is written.
  Do NOT delete or skip a test to make the suite green.
-->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="web/core/tests/phpunit.xsd"
         bootstrap="web/core/tests/bootstrap.php"
         colors="true"
         beStrictAboutTestsThatDoNotTestAnything="true"
         beStrictAboutOutputDuringTests="true"
         beStrictAboutChangesToGlobalState="true"
         failOnWarning="true"
         cacheResult="false">

  <php>
    <ini name="error_reporting" value="32767"/>
    <ini name="memory_limit" value="-1"/>
    <env name="SIMPLETEST_BASE_URL" value="http://ceonline-d10.ddev.site"/>
    <env name="SIMPLETEST_DB" value="mysql://db:db@db/db"/>
    <env name="BROWSERTEST_OUTPUT_DIRECTORY" value="/var/www/html/web/sites/simpletest/browser_output"/>
    <env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
    <!--
      D7 GOLDEN MASTER — read-only.
      Tests that compare D10 output against the live D7 source use the 'migrate'
      connection defined in settings.local.php. That account is SELECT-only and
      the restriction is enforced by the database server, not by convention.
      No test may write to D7.
    -->
    <env name="CE_D7_CONNECTION" value="migrate"/>
  </php>

  <testsuites>
    <testsuite name="rules_behavior">
      <directory>web/modules/custom/ce_rules_behavior/tests/src</directory>
    </testsuite>
    <testsuite name="custom">
      <directory>web/modules/custom/*/tests/src</directory>
    </testsuite>
  </testsuites>

  <source>
    <include>
      <directory>web/modules/custom</directory>
    </include>
    <exclude>
      <directory>web/modules/custom/*/tests</directory>
    </exclude>
  </source>
</phpunit>
