O'Reilly logo

Learn CakePHP: With Unit Testing, Second Edition by Rādhārādhya Dāsa

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

© Sándor Gömöri 2016

Rādhārādhya Dāsa, Learn CakePHP, 10.1007/978-1-4842-1212-7_4

4. Test-Driven Development

Rādhārādhya Dāsa

(1)Somogyvamos, Hungary

A337704_2_En_4_Figa_HTML.jpg

Let’s start to play by trying and doing

Developers who depend heavily on unit tests use a technique known as “test-driven development,” or TDD.

TDD is a software development process whereby you write tests before you implement code. So, the tests guide the developer to write the code itself. TDD is a cyclical process, with 4+1 steps: write tests, write code, refactor, test again, and repeat the process again.

PHP TDD Tools

There are many tools that can be of great help in TDD with PHP.

PHPUnit

PHPUnit ( ...

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