Reuse schema definition error cases #86

Closed
opened 2026-10-05 07:03:48 +02:00 by c.fahner · 1 comment
Owner

Currently all schema definition errors are "restricted" to the SchemaTest testing namespace. Other tests would be more thorough if they would be able to easily reuse the bad schema definitions, such as the Reference constraint tests which reference another schema.

Obtaining information from referenced schemas should produce the same errors as if a schema was created for them directly.

Add a tests/Common/Entities namespace and an accompanying Entities class. The class should contain utility methods for grouping the cases such as ::legalEntities() or ::entitiesWithFieldDefinitionErrors() (which all return class-string's.

They don't all have to be Entity's.

Currently all schema definition errors are "restricted" to the `SchemaTest` testing namespace. Other tests would be more thorough if they would be able to easily reuse the bad schema definitions, such as the `Reference` constraint tests which reference another schema. Obtaining information from referenced schemas should produce the same errors as if a schema was created for them directly. Add a `tests/Common/Entities` namespace and an accompanying `Entities` class. The class should contain utility methods for grouping the cases such as `::legalEntities()` or `::entitiesWithFieldDefinitionErrors()` (which all return `class-string`'s. They don't all have to be `Entity`'s.
Author
Owner

Already solved during development of #5.

Already solved during development of #5.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
slendium/ocd#86
No description provided.