D13 — Tests run on a dedicated PostgreSQL database (stables_testing)
Architecture decision record, relocated verbatim from the retired single-file
docs/tenancy/decision log. Status, thematic clusters, and how to record a new ADR: the decision log index.
RLS requires Postgres, and prod parity matters for a fintech, so the whole suite runs on
Postgres against stables_testing — never the dev stables DB. Provisioned automatically
by docker/postgres/init/01-create-test-database.sql on a fresh volume, or make test-db
for existing volumes. tests/bootstrap.php forces the test env (APP_ENV=testing, array
cache/session, sync queue, the test DB) because docker-compose injects the dev .env as
real environment variables that otherwise shadow phpunit.xml's <env> (this previously
made in-container runs use APP_ENV=local → CSRF 419s, and the dev DB → data loss).