tests!

Closes #3581666

● 9 test files, 47 tests, 81 assertions — all passing, zero lint violations

  • Unit/Model/TokenTest.php (4 tests) — Constructor, getters, default/explicit timestamps, TABLE_NAME
  • Unit/Service/TokenGeneratorTest.php (3 tests) — Token generation, SHA-256 format, uniqueness
  • Unit/PageCache/RequestPolicy/DisallowXAuthTokenRequestsTest.php (3 tests) — DENY with header token, query token, NULL without
  • Unit/Authentication/Event/TokenResponseEventTest.php (5 tests) — Constructor, hasAccess default/toggle, error message
  • Unit/Authentication/Event/LogoutEventTest.php (1 test) — Constructor stores Request + User
  • Unit/Authentication/Provider/AccessTokenProviderTest.php (12 tests) — applies() 3 cases, authenticate: empty token, not found, cache_endpoints + missing REQUEST-ID, inactive user, null user, success, refresh stale/skip fresh, valid/invalid signature
  • Unit/Service/LoginServiceTest.php (7 tests) — Empty login/password, username login, email fallback (with container), user not found, wrong password, logout, logoutFromAllDevices
  • Unit/Controller/AuthControllerTest.php (4 tests) — tokenResponse success + event denial, logout, logoutFromAllDevices
  • Unit/EventSubscriber/CacheEndpointSubscriberTest.php (8 tests) — Subscribed events/priorities, cache with permanent/timed expiry, skip on negative lifetime, disabled endpoints, missing REQUEST-ID

Merge request reports

Loading