2. About Me Jeremy Kendall PHP Developer since 2001 Organizer Memphis PHP Contributor to FRAPI project (getfrapi.com) [email_address] @JeremyKendall http://jeremykendall.net 3. TDD in PHP: A Brief Example Test Driven Development, you say? 4. Frankly, my dear . . . 5. Why You Should Give A Damn
6. What is TDD?
7. Test Driven Development (TDD)is a software development process that relies on the repetition of a very short development cycle. . . 8. TDD Development Process
9. Run all tests, watch new test fail 10. Write just enough code to make the test pass 11. Run all tests, watch new test pass 12. Lather, rinse, repeat . . . 13. Refactor 14. TDD: The Benefits
15. Confidence 16. Faster time to resolution 17. Documentation 18. TDD: The Drawbacks
19. False sense of confidence 20. Without management and team buy-in, TDD is DOA 21. TDD: Live Code Example
22. TDD: Live Code Example
23. Requirements
24. Throws exceptions in the following cases:
25. Integer overflow 26. Integer underflow 27. TDD: Live Code Example
28. PHPUnit will be configured with phpunit.xml 29. phpunit.xml:
30. Tells PHPUnit where to look for our tests 31. Code coverage and testdox reports bootstrap.php:
32. Registers a simple autoloader 33. TDD: Live Code Example
34. Interface, not implementation 35. Interface: Tutor_Calculator_Interface 36. Implementation: Tutor_Calculator_IntegerCalculator 37. LET'S GET IT ON! 38. Resources
39. PHPUnit -http://www.phpunit.de/ 40. Xdebug - http://www.xdebug.org/ 41. The code example in this presentation was adapted for PHP from Przemysaw Bielicki's TDD video tutorial at Agile Software Development. -http://bit.ly/byDZOA 42. Thanks!
Top Related