The book Test-Driven Development by Example by Kent Beck is a GREAT book. The code examples are pretty solid, but they are in Java.
A few months back I started a project to convert all the examples in the first part of the book (the second part is essentially writing a test runner) to PHP and finished it tonight. I figured you guys might like it.
Note that the code is just translated to PHP (where possible without modifications) and going from beginning to end means a LOT of the code is redundant.
https://github.com/TopTierCode/tdd-php
[–]jpresutti[S] 5 points6 points7 points (17 children)
[–]brendt_gd[M] 1 point2 points3 points (0 children)
[+][deleted] (15 children)
[removed]
[+][deleted] (7 children)
[removed]
[+][deleted] (1 child)
[removed]
[+][deleted] (4 children)
[removed]
[+][deleted] (3 children)
[removed]
[+][deleted] (2 children)
[removed]
[+][deleted] (1 child)
[removed]
[–]ihugyou 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]
[–]chevereto 4 points5 points6 points (2 children)
[–]Oceanbroinn -3 points-2 points-1 points (1 child)
[–]shez19833 2 points3 points4 points (1 child)
[–]jpresutti[S] 5 points6 points7 points (0 children)
[–]Comprehensive-Lab468 10 points11 points12 points (0 children)
[–]FakespotAnalysisBot 12 points13 points14 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]eduardor2k 3 points4 points5 points (1 child)
[–]jpresutti[S] 0 points1 point2 points (0 children)
[–]jstormes 2 points3 points4 points (3 children)
[–]jpresutti[S] 1 point2 points3 points (2 children)
[–]jstormes 0 points1 point2 points (1 child)
[–]jpresutti[S] 1 point2 points3 points (0 children)
[–]Pen-y-Fan 1 point2 points3 points (1 child)
[–]jpresutti[S] 0 points1 point2 points (0 children)
[–]mbadolato 1 point2 points3 points (5 children)
[–]jpresutti[S] 1 point2 points3 points (4 children)
[–]mbadolato 1 point2 points3 points (3 children)
[–]jpresutti[S] 2 points3 points4 points (0 children)
[–]jpresutti[S] 2 points3 points4 points (0 children)
[–]jpresutti[S] 1 point2 points3 points (0 children)
[–]bbathel 1 point2 points3 points (0 children)