Code Analysis Through Unit Testing
Paul Mitchum Mile23 on drupal.org @PaulMitchum
☐ MidCamp 2015 ☑ SANDcamp 2015
Code Analysis Through Unit Testing Paul Mitchum Mile23 on - - PowerPoint PPT Presentation
Code Analysis Through Unit Testing Paul Mitchum Mile23 on drupal.org @PaulMitchum MidCamp 2015 SANDcamp 2015 Community Shout-Outs SeaDUG: https://groups.drupal.org/seattle Organizing PNWDrupalSummit SeattlePHP:
Paul Mitchum Mile23 on drupal.org @PaulMitchum
☐ MidCamp 2015 ☑ SANDcamp 2015
improving maintainability.
process.
purpose.
do our job.
dusty code that needs a bath. Unmaintainable, unmaintained…
legacy code to a new person today.
documentation, first-pass analysis.
but you can’t explain it to others effectively. AKA Hit By A Bus Scenario. Relies on no one. Does not exist.
code.)
available to help you maintain the code without reading
understand the code. (Complex code, tests, coverage.)
your expectations and implementation behavior.
write tests, you won’t. Untested expectations can
(circa 2015)
Analysis Expectations Test Measure Code Analysis Other Processes Code Maintenance
(c. end of the dark ages) Observation Hypothesis Experiment Falsify/ Reproduce Understand Universe
code.
array('@name' => $account->name));
Drupal.
should.
PoStreamReader::readLine().
tests with an eye towards coverage.
evaluate that.
that.
clue as to where to start because we performed analysis.