Removing legacy code that will not work on current versions of phpunit,
fixes #3955