Review main Merged

87148[TASK] Use phpunit DoesNotPerformAssertions attribute

Christian Kuhn CR +2 V +2 Normal +53 −91 updated 11/27/24, 07:54

Commit message

There are valid cases where tests do not assert
anything and still test some subject functionality.

Tests without assertions are however often developer
oversights, so phpunit warns about them, which is
disabled via phpunit configuration currently.

The patch enables this configuration, removes some
dummy assertions, and uses #[DoesNotPerformAssertions]
to mark legit cases for phpunit to stop mumbling.

The patch requires a typo3/testing-framework raise:
> composer u typo3/testing-framework

Review

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

Issues 1

Files 20

Review log 1421

  1. Christian Kuhn uploaded patch set 1 11/21/24, 13:29

  2. core-ci voted on patch set 1 V -1 11/21/24, 13:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69943

  3. Christian Kuhn uploaded patch set 2 V -1 11/21/24, 13:54

  4. core-ci voted on patch set 2 V -1 11/21/24, 14:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69946

  5. Christian Kuhn commented on patch set 2 CR -1 11/21/24, 14:11

  6. Christian Kuhn uploaded patch set 3 CR -1 V -1 11/26/24, 20:51

  7. Christian Kuhn uploaded patch set 4 11/26/24, 21:00

  8. core-ci voted on patch set 3 V -1 11/26/24, 21:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70219

  9. core-ci voted on patch set 4 V -1 11/26/24, 21:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70220

  10. Christian Kuhn uploaded patch set 5 V -1 11/26/24, 21:18

  11. Christian Kuhn commented on patch set 5 11/26/24, 21:21

    CustomPlatformDriverMiddlewareTest.php:44

    removed this one since it is unstable and depends on configuration / db engine too much: some drivers do have additional middlewares, others don't. this makes the foreach->assert() loop below unstable.
  12. core-ci voted on patch set 5 V +1 11/26/24, 21:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70222

  13. Christian Kuhn uploaded patch set 6 V +1 11/26/24, 21:43

  14. core-ci voted on patch set 6 V +1 11/26/24, 21:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70226

  15. Garvin Hicking voted on patch set 6 CR +1 V +1 11/26/24, 21:51

  16. Christian Kuhn updated the commit message in patch set 7 CR +1 V +1 11/26/24, 21:59

  17. core-ci voted on patch set 7 V +1 11/26/24, 22:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70227

  18. Garvin Hicking voted on patch set 7 CR +1 V +1 11/26/24, 22:06

  19. Stefan Bürk voted on patch set 7 CR +1 V +1 11/27/24, 07:38

  20. Christian Kuhn voted on patch set 7 CR +2 V +2 11/27/24, 07:54

  21. Christian Kuhn merged patch set 8 11/27/24, 07:54