[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.0
Reviewed-on: https://review.typo3.org/31229
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel