O'Reilly logo

Learning Yii Testing by Matteo Pescarin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Summoning the Test Doubles

In this chapter, we are going to take a close look at test doubles in order to control our tests with more accuracy and avoid having to rely on interfaces we don't know anything about.

We're going to complete the work we started in the previous chapter and understand how to deal with external dependencies, particularly the difference between stubs and mocks.

We will then spend the rest of the chapter on understanding how to organize our tests to improve legibility and maintainability, using some BDD-oriented tools we've introduced earlier in the book, such as Specify and Verify.

On a high level, these are the topics that we will cover in this chapter:

  • Dealing with external dependencies
  • Isolating components with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required