PHPUnit Test Doubles

Test doubles allow you to test the parts of your application that you want to test without having to rely on a bunch of dependencies being set up correctly...that could be complicated and painful.

Lets create our first test double and then we'll build upon that as this section progresses.

You'll notice that the attached files have some small differences to the ones on the video. Basically, I've just made some improvements to the code where I can..think things like type hints rather than functional changes.

Lesson Branch: https://github.com/GaryClarke/test-doubles/tree/phpunit-test-doubles

Complete and Continue  
Discussion

4 comments