Mocking Dependencies in PHPUnit

Comments

Comments are closed.

Really good stuff! Can you share your slides?

Private methods points might be a good time to introduce the idea of tests informing design: If you are trying to work with the private, why? Should be a code smell pointing you in a different direction. Theory slide prompted me to think about simulating failure conditions without destroying the real resource you are accessing as well. You did address this point into the Response section. Cognitive dissonance from saying you don't watch movies and then mocking the audience for not having seen Dumb & Dumber :)

Good info absorbed by an attentive crowd. Thanks for preaching the word!

Rated 4

Anonymous at 10:01 on 23 May 2014

Slides please, more info about how to change bad classes into good.

Very comprehensive talk on mocking objects.

Very good explanation of the ins and outs of mocking.

Really enjoyed the talk and the examples were very well explained and helpful.

Good coverage on the terminology of test mocking / doubles and how to use them. Might be able to consolidate the intro to DI and bits throughout the remainder of the talk on not hitting DB / APIs directly. Make it the intro a "Here's why you want to use mocks / doubles" and then flow right into "Here's how you use them".

Minor quibble though; been writing unit tests but now have a better understanding of what I have actually been writing.

Rated 5

Anonymous at 16:03 on 23 May 2014

Informative and engaging as always. The examples were helpful and explained well. Looking forward to putting this to good use!