From Events to Insights: Testing and Documenting Event‑Based Software
summary
Event‑sourced examples reconstruct a bank account from an event stream and tests written in PHP using PHPUnit adopt a given-when-then API to assert emitted domain events; PHPUnit’s provideAdditionalInformation hook transports JSON test metadata to a custom Graphviz dot‑based extension that writes SVG/PDF diagrams. The repo shows working code, runnable tests and an extension registered in phpunit.xml that generates per‑test sticky‑note visuals and an overall event‑map linking emitters, readers and projections.
AI-written summary · about
chapters (11)
- 0:00Event-based software intro
- 5:29Event-based vs event-sourced systems
- 10:11Event sourcing in PHP
- 17:04Layered architecture
- 19:48Testing event-based software
- 25:30Unit testing command processors
- 27:41Given-when-then for events
- 32:12Visual docs from tests
- 36:09Architecture mapping
- 45:21Key takeaways
- 47:08Resources and final acknowledgments








