Review main Merged

96041[TASK] Assert outcomes in core unit tests

Wouter Wolters CR +2 V +2 Normal +73 −50 updated 09/25/26, 20:04

Commit message

Several tests only invoked code or configured mocks, so they could pass
without checking the behavior named by the test.

Assert preview state, written site configuration, and file collection
replacement. Require expected exceptions for invalid database edits
and error handling, and check the arguments passed to link creation.

Reject dispatched mail events so SMTP and sendmail tests verify the
transport type and one dispatch without external services. Exercise
package scans with fixture paths, compare registered package keys
instead of sort() results, and verify discovery retains existing
configuration.

Review

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

Issues 1

Files 8

Review log 911

  1. Wouter Wolters uploaded patch set 1 09/24/26, 19:34

  2. core-ci voted on patch set 1 V +1 09/24/26, 19:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109178

  3. Oliver Klee voted on patch set 1 V +1 09/24/26, 21:38

  4. Oliver Klee commented on patch set 1 09/24/26, 21:45

    PreviewModuleTest.php:91

    Can't we use a stub here as well?

    ErrorHandlerTest.php:115

    We can use `self::assertNull()` here.

    PackageManagerTest.php:223

    We can use `assertEqualsCanonicalizing` instead, which will allow us to ditch the two `sort`s.

    PackageManagerTest.php:265

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

  6. Wouter Wolters commented on patch set 2 09/25/26, 16:33

    PreviewModuleTest.php:91 Reply

    Done

    ErrorHandlerTest.php:115 Reply

    Done

    PackageManagerTest.php:223 Reply

    Done

    PackageManagerTest.php:265 Reply

    Done
  7. core-ci voted on patch set 2 V +1 09/25/26, 16:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109271

  8. Oliver Klee voted on patch set 2 CR +1 V +1 09/25/26, 17:04

  9. Garvin Hicking voted on patch set 2 CR +1 V +1 09/25/26, 18:24

  10. Stefan Bürk voted on patch set 2 CR +2 V +2 09/25/26, 20:04

  11. Stefan Bürk merged patch set 3 09/25/26, 20:04