#!/usr/bin/env bash
# Runs the suite exactly as CI does: SQLite always, MySQL when reachable.
# The MySQL connection comes from phpunit.xml.dist env defaults or the
# MYSQL_TEST_* variables. If MySQL tests are skipped locally, fix the local
# database before merging — CI treats a skip as a failure (doc 12 §10 rule 4).
set -euo pipefail
cd "$(dirname "$0")/.."

vendor/bin/phpunit "$@" | tee /dev/stderr | grep -q 'OK (' && echo "Both dialects green."
