Commit Graph

9 Commits (8396d5e46a5d11ffa9abf221bb85b19107a3106b)

Author SHA1 Message Date
Your Name 8a2649b3ff feat: add critical path test suite and fix auth/config issues
Test Infrastructure:
- Modernize phpunit.xml (bootstrap, source block, Laravel 12 env vars)
- Configure tests/Pest.php with pest()->extend(TestCase::class)->in('Feature')
- Add docker-compose.test.yml (Redis for test suite)
- Add composer test/test:quick scripts
- Rename CACHE_DRIVER to CACHE_STORE across config (backwards compatible)
- Update .env.testing for in-memory SQLite + Docker Redis

Test Coverage (190 tests):
- CriticalRoutes: public routes, auth routes, API endpoints, middleware, schedule
- Auth/LoginTest: login, logout, rate limiting, redirect behavior
- Auth/RegisterTest: registration flow, validation, disabled registration
- Auth/PasswordResetTest: reset request, token validation, password update
- Auth/TwoFactorTest: 2FA checkpoint, setup behind password confirmation
- Auth/PasswordConfirmationTest: sudo mode flow via Laravel password.confirm
- Api/ScopeTest: scope enforcement, public endpoints, admin access

Bugs Fixed:
- Fix unauthenticated API returning 500 instead of 401 (AuthenticationException
  not handled in custom exception renderer in bootstrap/app.php)
- Replace custom DangerZone middleware with Laravel password.confirm
- Add HasFactory trait to Profile model for test factories

Bugs Documented (known-bugs group):
- Registration crashes with str_ends_with TypeError (RegisterController:82)
- OAuth routes use legacy array syntax causing ReflectionFunction TypeError
4 weeks ago
Daniel Supernault b1f95a7213
Bump laravel, v9 => v10 3 years ago
Daniel Supernault 877023fb21
Update purify config, fix microformats support 7 years ago
trwnh f553543a16
Add more safe html types
- b for bold
- del for semantic redaction
- s, strike for strikethroughs
- h6 was missing
8 years ago
Daniel Supernault aaf5253422
Rename .env var, based on feedback from https://mastodon.social/users/alicerunsonfedora/statuses/101978263084840936 8 years ago
Daniel Supernault 4e14cabe70
Update html purifier config 8 years ago
Daniel Supernault 82b7782c2b
Update config 8 years ago
Daniel Supernault 23b96e3389
Update HTML Purifier config 8 years ago
Daniel Supernault b7e22af48e
Add html purifier config 8 years ago