padraic/mockery — pull request #216 by davedevelopment (2013-11-07 09:55:03+00:00)
Title: [RFC] Mocking protected methods

Putting this up here for discussion, particularly the naming `shouldAllowMockingProtectedMethods` is particularly verbose, but seeing as we require verbose names usually anyway, I can't really think of anything better.

Mocking anything that isn't part of the public API is generally considered a bad practice, but this comes up so much that I'd rather we allowed let. Mockery isn't a teaching tool, we have Prophecy for that. However, as requested by @padraic in #154, I implemented it with a switch, rather than it automatically coming on.

ping @aik099

Fixes #154
Fixes #168
Closes #169