The :memory: overrides in phpunit.xml had been commented out since 2024,
so RefreshDatabase ran migrate:fresh against the real .env database and
wiped it on every local test run. Enable the overrides, let the special
:memory: identifier bypass database_path() resolution and the boot-time
touch(), and add a TestCase guard that aborts the suite unless it is
pointed at in-memory sqlite.
ItemExportTest only ever passed by reading the populated dev database;
seed the root dashboard item it depends on so it passes on a fresh DB.
- itemImport: check response.ok in fetchAppDetails so a genuine 404
(from the appload return-type fix) is reported as 'Failed to find app
id' instead of being parsed as a successful import; applied to the
source and the committed compiled bundle.
- phpunit.xml: point the schema URL at 12.5 to match the installed
PHPUnit 12.5.x.
- ColorHelpersTest: exercise the get_brightness() non-hex stripping the
test name promised (interior separators), which the prior assertion
never covered.
`<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI.
Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/