[BUGFIX] Fix unit tests after latest PHP changes

Latest changes in PHP disallow unserialize on
certain internal classes. Since phpunit uses
unserialize to create objects of such classes
when requesting a mock without calling the constructor
these tests failed with a PHP fatal error.

Instead of skipping the tests, we can simply provide
mocked constructor arguments (if required) so that
phpunit can create a mock object by using the new operator
and passing these mocked constructor arguments.

Change-Id: I26aa06125581b4ca93abcbad2ebb98003509e81a
Resolves: #59979
Related: #59685
Releases: 6.1
Reviewed-on: https://review.typo3.org/31221
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel