Add browser and unit test suite with Pest + Playwright

Add comprehensive test coverage for core site features (content,
navigation, language, FAQ, news, petition, newsletter) using Pest
browser tests and unit tests for custom plugins. Includes test
infrastructure (Containerfile.test, compose.test.yaml), test
documentation, and test files covering petition form logic, CSV
handling, translation, date formatting, rate limiting, and map data
building.
This commit is contained in:
Ruben 2026-03-17 16:43:39 +01:00
parent 0b61643ec5
commit b8e6d2537d
20 changed files with 1331 additions and 33 deletions

10
tests/Pest.php Normal file
View file

@ -0,0 +1,10 @@
<?php
// Base URL for browser tests — http://app when running in compose.test.yaml
define('BASE_URL', rtrim((string) getenv('APP_URL') ?: 'http://app', '/'));
// Path to custom/ source — /app/custom in container (mounted via compose.test.yaml)
define('CUSTOM_DIR', __DIR__ . '/../custom');
// Group all Unit tests
uses()->group('unit')->in('Unit');