fix for issue #139

Fix and test for https://github.com/sebastianbergmann/phpunit-mock-objects/issues/139