About this talk
This talk explores the fundamental concepts of unit testing and the various types of test doubles, including dummy, fake, stub, spy, and mock, with practical code examples using PHPUnit and Prophecy. The speaker discusses the distinction between sociable and solitary tests, as introduced by Jeffrey Fields, to help clarify testing strategies. Additionally, the session addresses the common issue of test smells and offers strategies for managing them, such as the Arrange-Act-Assert pattern, object mothers, and data builders. Attendees will gain a comprehensive understanding of unit testing techniques and when to apply different approaches effectively.
More from this event
See all 164 talks →
DrupalCon Nashville 2018: Grand Ole Drupry Prenote
39:55
DrupalCon Nashville 2018: JavaScript and Accessibility: Don't Blame the Language
35:12
DrupalCon Nashville 2018: Migrating a small city to Drupal
56:00
DrupalCon Nashville 2018: Developer to Manager: A Survival Guide
58:06