© 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 ( ...

Get Learn CakePHP: With Unit Testing, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.