quality-tutorial
quality-tutorial copied to clipboard
01:30 - Testing (50m)
- [x] Write some AWFUL TERRIBLE BAD code - write a test that shows it's still possible
- [x] Exercises to refactor the legacy awfulness. Techniques to use:
- DI
- Strict types
- Smaller, meaningful methods
- Less code branches
- Code coverage exercises:
- [x] Branch coverage vs Line coverage
- [x] Leaking coverage outside the SUT
- [x] Infection PHP demo
- Behavioural
- [x] Example of bad Gherkin vs well written features
- [x] Implement DOMAIN level test with good features
- [x] Implement UI test with the same feature