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
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