Commit graph

11 commits

Author SHA1 Message Date
cd40483cd4
remove default values from user constructors
Forcing every call site to be explicit about admin status and
password eliminates a class of bugs where an unintended
isAdmin=false or empty passwordHash could silently slip through.
The CreateUserTest case that asserted the isAdmin default is
dropped since the default no longer exists.
2026-04-26 10:46:07 +03:00
a65c9259fa
dont cast email to string, use new value method 2026-04-26 10:19:38 +03:00
bb6bd7cbb3
use FakePasswordHasher in tests to eliminate bcrypt cost
Add a trivial prefix-based PasswordHasher fake and inject it into the
three test files that exercise CreateUser or AuthenticateUser. Drops
the full phpunit suite from ~7.4s to ~30ms (about 224x) without
losing coverage: the round-trip through hash/verify still validates
that CreateUser stores something other than the plaintext and that
AuthenticateUser only succeeds on a matching hash.

CreateUserTest is also refactored to use a setUp method, matching
the pattern already used in AuthenticateUserTest and AuthControllerTest.
2026-04-26 09:06:26 +03:00
fd5278b3fe
test authenticate user 2026-04-24 13:20:45 +03:00
38cfd34645
test create user requires password 2026-04-24 13:18:00 +03:00
30b8cc2c74
test create user rejects duplicate email 2026-04-24 13:16:57 +03:00
160181888d
test user has is admin flag 2026-04-24 13:14:20 +03:00
1ce3799044
test create user use case validates null email 2026-04-19 23:13:34 +03:00
189493b045
php cs fixer 2026-04-19 23:07:48 +03:00
9f38708f7b
rename fake user repo, request doesnt have value object 2026-02-14 21:56:22 +02:00
0e2ddd6a5c
test user is created with email 2026-02-14 20:50:03 +02:00