no need to test concrete implementations

This commit is contained in:
Yisroel Baum 2026-04-26 10:23:57 +03:00
parent a65c9259fa
commit 2fe41a5fe7
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
3 changed files with 3 additions and 120 deletions

View file

@ -20,6 +20,9 @@ Code patterns to follow:
- Entities: constructor with properties, getters
- DTOs: simple data containers for creation
- Repositories: interfaces that define data access
- Do not write unit tests for concrete repository implementations
(e.g., Doctrine/persistence-backed). They are exercised by e2e
tests. Use cases are tested with fake repositories.
- Use cases: business logic with Request objects
- When throwing exceptions, add @throws docblock
- Fakes: in-memory implementations for testing