~/talk

Guidelines for Writing Good Test Code — From Creation to Operation

TalkinJapaneseat PHP Conference Japan 2024 · on Sunday, 2024-12-22· [php]
slides:none on file

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

  1. 0:00Introduction
  2. 1:05Why create guidelines
  3. 3:33Purpose of testing
  4. 4:36Behavior vs implementation
  5. 7:23Mock usage best practices
  6. 10:12Test levels and coverage
  7. 14:07Reducing cognitive load
  8. 15:32Guideline creation points
  9. 19:25Post-implementation challenges
  10. 21:32Summary
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.