Skip to content
Snippets Groups Projects
Commit 09789e67 authored by Christian Kuhn's avatar Christian Kuhn Committed by Anja Leichsenring
Browse files

[TASK] Avoid phpunit addMethods()

phpunit 11 deprecates addMethods() on mocks.
There are various solutions:

* Use onlyMethods([]) instead of
  addMethods(['dummy']) to "mock nothing"
* Remove a couple of calls that were bogus
  in the first place
* Turn calls into mocks of interfaces
* Turn calls into mocks of fixture classes
* Instantiate a subject with new()

Also have the one or the other minor cleanup as drive-by.

Change-Id: I5dad1cc65c14ed50b3941beaa7132040bc415a11
Resolves: #103218
Releases: main
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83150


Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
parent ba4a9117
Branches
Tags
No related merge requests found
Showing
with 175 additions and 351 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment