Review main Merged

89277[BUGFIX] Convert container-dependent Site tests to functional tests

Andreas Kienast CR +2 V +2 Normal +81 −88 updated 04/29/25, 12:36

Commit message

The test class `TYPO3\CMS\Core\Tests\Unit\Site\Entity\SiteTest` has some
unit tests that taint the dependency injection container which may spill
into other tests that depend on a clean state. This occured in the past
when running unit tests in random order:

```
1) TYPO3\CMS\Frontend\Tests\Unit\Typolink\EmailLinkBuilderTest::invalidEmailGetsHscedProperly
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'<a href="#" data-mailto-token="pdlowr-qr&#039;pdloCdfph1frp" data-mailto-vector="3">no&#039;mail(at)acme.com</a>'
+'<a href="#" data-mailto-token="" data-mailto-vector="3">no&#039;mail(at)acme.com</a>'
/builds/typo3/CI/cms/typo3/sysext/frontend/Tests/Unit/Typolink/EmailLinkBuilderTest.php:108
```

The affected tests are now converted into a functional test, where
container modifications are not required.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Garvin Hicking +1
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Oliver Hader +1
    • Benni Mack +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Georg Ringer +1
    • Oliver Klee +1
    • Garvin Hicking +1
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1011

  1. Andreas Kienast uploaded patch set 1 04/29/25, 10:20

  2. Stefan Bürk voted on patch set 1 CR +1 V +1 04/29/25, 10:25

  3. Georg Ringer voted on patch set 1 CR +1 V +1 04/29/25, 10:29

  4. core-ci voted on patch set 1 V +1 04/29/25, 10:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78340

  5. Benni Mack voted on patch set 1 CR +1 V +1 04/29/25, 10:32

  6. Oliver Klee voted on patch set 1 CR +1 V +1 04/29/25, 10:33

  7. Anja Leichsenring voted on patch set 1 CR +1 V +1 04/29/25, 10:44

  8. Garvin Hicking voted on patch set 1 CR +1 V +1 04/29/25, 11:03

  9. Andreas Kienast voted on patch set 1 CR +2 V +2 04/29/25, 11:04

  10. Andreas Kienast merged patch set 2 04/29/25, 11:53

  11. Oliver Hader voted on patch set 2 CR +1 04/29/25, 12:36