Skip to content

v2.6: Set up PHPUnit and enhance TextControl value mapping

Choose a tag to compare

@thorewi thorewi released this 10 Oct 05:34
· 1 commit to master since this release
Introduces a comprehensive PHPUnit test suite with test entities and an in-memory EntityManager factory. This provides a robust foundation for future development and ensures correctness of data mapping.

Enhances `TextControl` to properly handle:
*   Boolean entity properties mapping to `0`/`1` for `ChoiceControl` components (select, radio lists) and back to `true`/`false`. This prevents issues where `false` entity values would not be correctly selected in the form.
*   Enum values mapping to their scalar backing values in form fields.
*   Empty strings from form fields mapping to `NULL` for nullable entity properties.

This ensures more robust data hydration and persistence for common scalar types.