Review main Merged

95880[TASK] Streamline temporary file cleanup in unit tests

Wouter Wolters CR +2 V +2 Normal +52 −88 updated 09/23/26, 01:53

Commit message

Several unit tests remove temporary artifacts inline or implement
custom tearDown methods. This duplicates cleanup logic.

Register created files and directories in the inherited
testFilesToDelete collection. UnitTestCase removes them consistently
during tearDown, including when a test fails early.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 79

  1. Wouter Wolters uploaded patch set 1 09/16/26, 16:02

  2. Oliver Klee commented on patch set 1 09/16/26, 16:07

    Cleanup that needs to take place even if a test fails or throws an exception should happen in `tearDown()` instead. We could put the paths to unlink in a property for this.
  3. Oliver Klee commented on patch set 1 09/16/26, 16:07

    Or we could convert these two tests into functional tests (with the DB disabled). I'd consider that the cleanest solution.
  4. core-ci voted on patch set 1 V +1 09/16/26, 16:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108701

  5. Wouter Wolters uploaded patch set 2 V +1 09/16/26, 16:35

  6. core-ci voted on patch set 2 V +1 09/16/26, 16:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108704

  7. Oliver Klee commented on patch set 2 CR +1 V +1 09/16/26, 17:05

    Reply

    Done

    Reply

    Done
  8. Benni Mack voted on patch set 2 CR +2 V +2 09/23/26, 01:53

  9. Benni Mack merged patch set 3 09/23/26, 01:53