Add PHPUnit tests with coverage for all src classes

- 21 test files covering controllers, services, entities, enums, messages
- CI: add test job with Xdebug coverage (clover + text)
- SonarQube: configure coverage report path and test sources

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-18 22:50:23 +01:00
parent d13e9b6b80
commit dc3d464b17
24 changed files with 1120 additions and 0 deletions

View File

@@ -93,6 +93,25 @@ jobs:
- name: Security audit
run: composer audit
test:
runs_on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: intl, pdo_pgsql, zip, gd, redis, imagick
coverage: xdebug
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run PHPUnit with coverage
run: vendor/bin/phpunit --testdox --coverage-clover coverage.xml --coverage-text
sonarqube:
runs_on: ubuntu-latest
steps: