$30 off During Our Annual Pro Sale. View Details »

Test-driven development with PHPUnit

Test-driven development with PHPUnit

Oliver Klee

July 15, 2017

More Decks by Oliver Klee

Other Decks in Technology


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

  2. Unit

  3. Manual testing is cumbersome

  4. Automated
 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

  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

  16. Testsuite Testcase Test Assertion Test Test Testcase

  17. Code test-first write
 test write
 code refactor

  18. None