~/talk

Building Testable PHP Applications

Talkat SunshinePHP 2014 · 2014-02-06..02-08· [testing, php]
slides:none on file

Claims a few immediate rules let messy PHP become testable now: replace "new" with constructor injection, isolate business logic from the framework, write test doubles for DB and APIs instead of using a real database, prefer Mockery over PHPUnit mocks for spies, and measure coverage with xdebug. Demonstrations show mock setups, wrapper APIs, and Vagrant-backed dev environments; a large suite example hits hundreds of thousands of PHP tests and runs in about 15 minutes.

AI-written summary · about

  1. 0:00Start
  2. 7:18It's About Tools
  3. 7:49It's About Strategies
  4. 8:07WHAT DOES TESTABLE CODE
  5. 18:00The Law of Demeter
  6. 19:51Dependency Injection
  7. 22:56Test Doubles
  8. 32:55Databases In Unit Tests
  9. 38:44API Calls
  10. 41:58Environmental Concerns
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.