DrupalCon Prague 2013: WRITING UNIT TESTABLE CODE IN DRUPAL 8
About this talk
This talk focuses on the importance of writing unit-testable code to ensure functionality across various scenarios and contexts. The speaker discusses the challenges developers face when code has hard dependencies and introduces the Dependency Injection pattern as a solution to achieving unit-testability. By using examples from contributed modules in Drupal 7, the session illustrates how to adapt these modules for Drupal 8 by following best practices for creating loosely coupled classes. Additionally, the session covers key essentials for writing effective PHPUnit tests for these well-designed classes.