Test-driven Development with PHPUnitOliver Klee, 2017-07@oliklee [email protected]
View Slide
Unit Tests?
Manual testing is cumbersome
Automated testing is fast
Unit tests for the Realty Manager TYPO3 extension
>1600 tests
< 60 seconds
Verify that your codedoes what you expect
Make sure that your changes won‘t break anything
Keep others from breaking your code
Don’t break anything even in complex projects
Create a safety netfor refactoringor for TYPO3 updates
Improvethe structureof your code
Green feels good!
Let’s get some terms straight
TestsuiteTestcaseTestAssertionTestTestTestcase
Code test-firstwrite testwrite coderefactor