/TDD-by-example

Exercises from Test Driven Development By Example in PHP

Primary LanguagePHP

Exercises from Test Driven Development By Example in PHP

Part I: The Money Example (chapter 1 to 16)

An example of typical model code written using TDD.

You can find the code of each chapter in the src directory and the tests in the tests directory.

To run the tests you need to have PHPUnit installed and execute this command:

> phpunit

Part II: The xUnit Example (chapter 18 to 23)

An example of testing more complicated logic, including reflection and exceptions, by developing a framework for automated testing.

You can find the code of each chapter in the src directory.

To run the tests you need to execute this command:

> php src/ChapterXX/console.php test