Review main Merged

93633[TASK] Add functional tests for DatabaseStorageAdapter

Josua Vogel CR +2 V +2 Hard +559 −0 updated 04/14/26, 10:23

Commit message

Add comprehensive functional test coverage for the form system's
DatabaseStorageAdapter, verifying full integration through the
real database layer (DatabaseStorageAdapter → FormDefinitionRepository
→ DataHandler → Database).

DatabaseStorageAdapterFunctionalTest covers:
- Full CRUD roundtrip (create, read, update, delete)
- Frontend context bypassing permission checks
- Handling of invalid JSON configuration in database
- Soft-delete behavior verification
- existsByFormIdentifier lookups
- Error handling for non-existing records

DatabaseStoragePermissionFunctionalTest covers:
- Admin user full access (read, write, delete)
- Non-admin without table access denied for read/write/findAll
- Non-admin with read-only access (tables_select) can read
  but not write, and forms are marked readOnly/non-removable
- Frontend context always allows read regardless of backend
  user permissions
- isAccessible() permission checks for different user roles

Test fixtures provide three backend users (admin, editor without
table access, editor with read-only access) with corresponding
backend groups, and three form definitions (active, soft-deleted,
minimal).

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1215

  1. Josua Vogel uploaded patch set 1 04/12/26, 16:39

  2. core-ci voted on patch set 1 V -1 04/12/26, 17:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100028

  3. Josua Vogel uploaded patch set 2 V -1 04/13/26, 05:36

  4. core-ci voted on patch set 2 V +1 04/13/26, 05:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100055

  5. Oliver Klee voted on patch set 2 V +1 04/13/26, 06:55

  6. Garvin Hicking voted on patch set 2 CR +1 V +1 04/13/26, 15:04

  7. Stefan Bürk commented on patch set 2 04/13/26, 20:27

    DatabaseStorageAdapterFunctionalTest.php:51

    No need to park that in a property. Is only used as parameter in the next line. Local scoped variable is enough.

    DatabaseStoragePermissionFunctionalTest.php:53

    .. like here ;)
  8. Josua Vogel commented on patch set 3 CR +1 V +1 04/14/26, 07:18

    Published edit on patch set 2.
  9. core-ci voted on patch set 3 V +1 04/14/26, 07:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100122

  10. Josua Vogel commented on patch set 3 04/14/26, 07:32

    DatabaseStorageAdapterFunctionalTest.php:51 Reply

    Done

    DatabaseStoragePermissionFunctionalTest.php:53 Reply

    Done
  11. Oliver Klee voted on patch set 3 V +1 04/14/26, 07:37

  12. Stefan Bürk voted on patch set 3 CR +1 V +1 04/14/26, 09:49

  13. Garvin Hicking voted on patch set 3 CR +1 V +1 04/14/26, 10:22

  14. Stefan Bürk voted on patch set 3 CR +2 V +2 04/14/26, 10:23

  15. Stefan Bürk merged patch set 4 04/14/26, 10:23