Sync with https://github.com/sebastianbergmann/phpunit-mock-objects/commit/ee8b777e0a0aea24856089fe4e83f9d7be4bac6d