db93871194
move inline use statements to file headers
...
two type hints introduced earlier on this branch referenced
classes by their fully-qualified names inline. hoist them to
the top-of-file use block per backend-context.md PHP rules.
2026-05-02 22:05:58 +03:00
cbbbc80326
update downstream tests for text user requirement
...
Text now requires a User on construction. seed a user in
each test setUp that creates a Text directly or through the
fake repository so the suite remains green.
2026-05-02 21:27:55 +03:00
40fdf25da2
add tests for text user relationship
...
cover that the created Text carries the supplied User, that
the controller persists the user from the session attribute,
and that any userId in the request body is ignored.
2026-05-02 21:27:49 +03:00
2eafe67f31
test scope schedule to requesting user
2026-05-01 10:19:03 +03:00
3711840669
test exclude future scheduled nodes
2026-05-01 10:18:47 +03:00
54e33f9b03
test empty schedule returns empty array
2026-05-01 10:18:32 +03:00
dd217e4142
test get todays schedule missing user
2026-05-01 10:18:02 +03:00
6d0b5d61e1
test get todays schedule null user id
2026-05-01 10:17:38 +03:00
4e2904a2b4
test get todays schedule null date
2026-05-01 10:17:10 +03:00
669bcf8d5e
style
2026-05-01 09:56:14 +03:00
e04931ac08
test that todays schedule only returns uncompleted nodes
2026-05-01 09:06:13 +03:00
ec4dca87a6
test that all nodes up until given date are returned
2026-04-28 22:48:25 +03:00
2047cd72e7
test get todays schedule and use case with request
2026-04-28 22:38:43 +03:00
a9265abeae
add node to scheduled node
2026-04-27 09:28:43 +03:00
8eb0f2366b
remove missed default value
2026-04-26 20:43:27 +03:00
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
f95adddaaf
fix code style in test files
2026-04-26 10:45:57 +03:00
13da7c311a
return utc from clock
2026-04-26 10:32:08 +03:00
2fe41a5fe7
no need to test concrete implementations
2026-04-26 10:23:57 +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
40649ded8e
test admin middleware
2026-04-24 13:26:20 +03:00
cd2168c822
test auth middleware
2026-04-24 13:25:17 +03:00
2a281386a5
test create session
2026-04-24 13:24:01 +03:00
c2ade8a601
test fake session repository
2026-04-24 13:21:51 +03:00
fd5278b3fe
test authenticate user
2026-04-24 13:20:45 +03:00
73ade7f971
update tests for user password hash
2026-04-24 13:19:51 +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
b2fc6a7ded
test fake user repo find by email
2026-04-24 13:16:02 +03:00
160181888d
test user has is admin flag
2026-04-24 13:14:20 +03:00
49663d70d9
distribute scheduled nodes evenly by filling days sequentially
2026-04-23 21:06:22 +03:00
358694e7e3
nodes are scheduled on different days according to dates provided
2026-04-23 20:54:08 +03:00
858f2e075f
test for date end being before date start
2026-04-23 20:50:26 +03:00
a752ff9ba5
add start and end date and test for null entries
2026-04-23 20:44:14 +03:00
f8a1c2616d
test that nonexistant text will throw error
2026-04-23 20:20:53 +03:00
c32087c35d
move instantiation of date time immutable to use case. request gets a string
2026-04-23 20:09:17 +03:00
32bf96dd99
test bulk create nodes throws if count is less than one
2026-04-19 23:36:18 +03:00
1a4144c278
test create scheduled node validates null fields
2026-04-19 23:14:25 +03:00
1ce3799044
test create user use case validates null email
2026-04-19 23:13:34 +03:00
86052efbcb
test create plan use case validates null fields
2026-04-19 23:12:41 +03:00
f6ec4a2550
test create text use case validates null name
2026-04-19 23:11:43 +03:00
a429b647cc
test create node use case validates null fields
2026-04-19 23:10:46 +03:00
5de15ef52d
test bulk create nodes validates null fields
2026-04-19 23:09:40 +03:00
189493b045
php cs fixer
2026-04-19 23:07:48 +03:00
3670fdd869
tests for bulk create nodes
2026-04-18 23:02:32 +03:00
f6791b6459
unit test for create text that it creates a root node as well.
...
refactor to setUp as well
2026-04-17 10:49:41 +03:00
844813499a
test that only nodes which are not parents are scheduled
2026-03-21 20:01:11 +02:00
a32989334e
test that creating a plan is done in context of a text and schedules all nodes of text
2026-03-01 11:55:22 +02:00
2affd2a84e
test that error is thrown if plan doesnt exist for creating scheduled node
2026-02-25 10:21:05 +02:00