RFC: Mocking protected methods
Update, 2011-06-16, 12:15 AM Thanks for the comments. (I swear I had something like that before and it didn’t work!) Here’s the solution: — Original blog entry — I wrote a couple tests for a small CouchDB access wrapper today. But when I wrote the implementation itself, I realized that my class setup depends on an actual CouchDB server being available and here my journey began. Example code Consider the following example:...