I read this answer which tells Mockery is an anti-pattern of TDD. But wait! We have to mock/stub all dependencies to write a unit-test. In other case it would be an integration test.
Overusing mocks can be an antipattern, not mocking itself. It's true that you need to mock/stub your dependencies, but when your class has too many dependencies, it can take more time and effort to mock and wire up everything correctly than to write the class itself. And the mocking definitions are very fragile and easy to break, what is somehow against TDD rules.
Too many dependencies means either that your class is some kind of god object that needs to be refactored or is some kind of top-level coordinator that do not have any special logic on its own (like only sequence of dependency calls), in which case I would say it is not really needed to unit test it, when all its components are unit tested well (integration tests can cover this nicely, unit test will be mocking hell without any real value).
精彩评论