TEST DRIVEN DEVELOPMENT

    by aaron on Thu, 04/24/2008 - 08:32

    Talking with one of my coworkers yesterday, we found ourselves in need of testing a drupal module in isolation.

    This module had a few complex elements to it, in addition to the regular drupal node functionality, such as web service calls and permissions checks, which made testing the module itself far too dependent on third party systems, and made testing itself exceptionally brittle.

    Introducing PHPMockFunction

    Tags: Drupalmock objectstest driven developmenttests by aaron on Tue, 05/22/2007 - 12:48

    So one of the biggest things I've run into in drupal-land is that it's virtually impossible to test database interactivity without actually touching the data on a live site. I started kicking around some ideas last night and came up with a half-way solution that may solve at least the first round of headaches with this.

    The Criteria

    Ideally, I wanted a solution that:

    1. does not rely on requests to the database to test a certain component.
    2. preserves existing data
    3. allows me to test certain conditions based on the way the data should be returned.

    Tags: Drupalmock objectsphpprocesstest driven development