some vibe tests

better than none
This commit is contained in:
2026-10-30 10:20:59 +01:00
parent 613154a1f9
commit d4eaa45baa
8 changed files with 596 additions and 0 deletions
+23
View File
@@ -75,6 +75,29 @@ needed just to run the application.
just test
```
`just test` starts a separate MySQL 5.7 service (`db-test`) and runs PHPUnit in
the PHP container. The `pollux_test` database uses temporary storage, has no
published port, and is separate from the development database and its volume.
Tests migrate this database automatically and roll back their fixtures after
each test. No demo or real-data seeders are needed. Run `just setup` first on a
new checkout to build the PHP image and install dependencies.
To run a focused subset:
```sh
just test --filter BookingsTest
```
Coverage includes login/logout and guest access, booking forms and changes,
split entries, validation, deletion cascades, income/expense totals, monthly
balances, year boundaries, project and scope reports, and target payment states.
These are PHP HTTP/database tests; they do not exercise browser JavaScript.
PHPUnit forces isolated database settings, and the test bootstrap refuses to run
against another database configuration. If cached application configuration
prevents testing, run `just artisan config:clear`. `just down` also stops the test
database; its temporary data is discarded when the container stops.
## Legacy compatibility notes
This project uses several old dependencies, so a few small compatibility fixes