This document discusses how object-oriented programming (OO) and test-driven development (TDD) were used for the Site Preview System (SPS) project in Drupal. It provides an overview of TDD, examples of writing and running tests in Drupal, and why an OO approach was useful for the relatively complex SPS system to allow for extensibility through plugins.