O'Reilly logo

PHPUnit Essentials by Zdenek Machek

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

Behavior-driven development

When it was said that there is no real alternative to PHPUnit, it wasn't exactly true, or to be precise, there is no real alternative in the PHP world for unit testing. However, the reason might be that in recent years, many developers discovered that unit testing has its own challenges and problems. An answer for this came in terms of BDD, which is a different approach in writing tests and testing your code. There are a few projects available that take a different approach to testing, and you might realize that you are better suited to BDD than TDD.

Understanding BDD

To explain what BDD is, we should go back to TDD to examine any potential weaknesses there. As we have seen, you first write a test, and then write the ...

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