Test-driven development with PHPUnit

Test-driven development with PHPUnit

610644ae9328059c33a272d08b90c75d?s=128

Oliver Klee

July 15, 2017
Tweet

Transcript

  1. Test-driven 
 Development
 with PHPUnit Oliver Klee, 2017-07 @oliklee typo3-coding@oliverklee.de

  2. Unit
 Tests?

  3. Manual testing is cumbersome

  4. Automated
 testing
 is fast

  5. Unit tests for the
 Realty Manager
 TYPO3 extension

  6. >1600 tests

  7. < 60 seconds

  8. Verify that your code does what you expect

  9. Make sure that
 your changes won‘t
 break anything

  10. Keep others
 from breaking your code

  11. Don’t break anything
 even in complex
 projects

  12. Create a safety net for refactoring or for
 TYPO3 updates

  13. Improve the structure of your code

  14. Green feels good!

  15. Let’s get
 some terms
 straight

  16. Testsuite Testcase Test Assertion Test Test Testcase

  17. Code test-first write
 test write
 code refactor

  18. None