If you can't read please download the document
Upload
jeremy-kendall
View
1.391
Download
1
Embed Size (px)
Citation preview
2. About Me Jeremy Kendall PHP Developer since 2001 Organizer Memphis PHP Author at http://csiphp.com [email_address] @JeremyKendall http://about.me/jeremykendall 3. TDD in PHP: A Brief Example Test Driven Development, you say? 4. Frankly, my dear . . . 5. Frankly, my dear . . . 6. Why You Should Give A Damn
7. What is TDD?
8. Test Driven Development (TDD)is a software development process that relies on the repetition of a very short development cycle. . . 9. TDD Development Process
10. Run all tests, watch new test fail 11. Write just enough code to make the test pass 12. Run all tests, watch new test pass 13. Lather, rinse, repeat . . . 14. Refactor 15. TDD: The Benefits
16. Confidence 17. Faster time to resolution 18. Documentation 19. TDD: The Drawbacks
20. False sense of confidence 21. Without management and team buy-in, TDD is DOA 22. TDD: Live Code Example
23. TDD: Live Code Example
24. Demonstrate refactoring with confidence 25. Demonstrate TDD impact on design decisions 26. TDD: Live Code Example
27. Tutor class (consumes calculator) 28. TDD: Live Code Example
29. Throws exceptions in the following cases:
30. Integer overflow 31. Integer underflow Code to interface not implementation
32. TutorCalculatorIntegerCalculator 33. TDD: Live Code Example
34. Uses calculator class(es) to test responses 35. Favors composition over inheritance TutorMathTutor
36. TDD: Live Code Example
37. PHPUnit will be configured with phpunit.xml 38. phpunit.xml:
39. Tells PHPUnit where to look for our tests 40. Code coverage and testdox reports bootstrap.php:
41. Registers simple autoloaders 42. LET'S GET IT ON! 43. Resources
44. PHPUnit -http://www.phpunit.de/ 45. Xdebug - http://www.xdebug.org/ 46. 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 47. Resources 48. Resources s 49. Resources 50. Thanks!