diff --git a/ai/backend-context.md b/ai/backend-context.md index dd69678..34729b2 100644 --- a/ai/backend-context.md +++ b/ai/backend-context.md @@ -20,6 +20,9 @@ intentionally omitted here - update this section as entities land. - Do not write unit tests for concrete repository implementations (e.g. `Postgres*Repository`). They are exercised by e2e tests. Use cases are tested with fake repositories. + - Do not write reflection-only contract tests for repository interface + method names, parameter counts, parameter names, or type hints. PHP + interfaces already enforce those signatures; test behavior instead. - Repository methods that find records by a foreign key should accept the related entity, not a raw id (e.g. `findBySet(Set $set)`, not `findBySetId(int $setId)`). diff --git a/backend/tests/Unit/Element/ElementRepositoryContractTest.php b/backend/tests/Unit/Element/ElementRepositoryContractTest.php deleted file mode 100644 index 84e5bb9..0000000 --- a/backend/tests/Unit/Element/ElementRepositoryContractTest.php +++ /dev/null @@ -1,24 +0,0 @@ -getParameters(); - - $this->assertCount(1, $parameters); - $this->assertSame('element', $parameters[0]->getName()); - $this->assertSame( - Element::class, - $parameters[0]->getType()->getName(), - ); - } -}