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

Writing maintainable unit tests

As the last part, before leaving the unit tests behind, I wanted to show some additional features provided by Codeception that have been already introduced in Chapter 1, The Testing Mindset.

Codeception has been created with modularity and flexibility in mind, so anything else is your responsibility. In particular, you might have already noticed that our UserTest class has grown quite a bit.

So, what would happen if a change in the interface or in the way our model works breaks our tests?

It's quite clear, especially if you're working in a team or even more if your code gets handed over to other people to maintain, that you need clear rules so that everybody agrees on how to write the code, as a starter, and tests. ...

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