Guidelines for Writing Good Test Code — From Creation to Operation
summary
A concrete PHP test style guide for a Laravel codebase is presented, produced after a 15-hour reading group with runnable examples. It defines test roles by level (unit/service/controller), gives prioritized concrete rules (priority A/B/C), recommends minimizing mocks in favor of behavior/output tests, and emphasizes clear test names and appropriate assertions. The guide was rolled out but saw only partial adoption, so next steps are PR automation, language-model–assisted reviews, and periodic tuning to improve uptake.
AI-written summary · about
