profile

Testing times

Crash test dummy

Over the past week or two I've spent my time working on a Drupal install profile. It uses a custom theme, a bunch of features and a set of modules that allows us to use Aegir to quickly provision a standard website for research centres and projects and associated with our university faculty.

To make sure this install profile keeps working as we make incremental improvements to it, I decided it would be nice to have some tests. For instance, to check that the correct theme is enabled, that the various roles defined in the features we use have the correct level of access to the nodes defined there as well and that blocks are placed in the correct regions with the correct visibility settings.

Unfortunately, the default DrupalWebTestCase class doesn't run profile install tasks, so my tests all failed horribly no matter what I did. 

Migrating users and content profiles

For some time now I've been working on a Drupal site that consists mainly of scraped content from a proprietary, ASP based CMS from the late nineties. The Simple HTML Dom Parser, used from within a drush script, has been invaluable. It made scraping the old site content and importing it as Drupal nodes a relative breeze. (No access to the database used by the CMS, boo!)

Part of setting up the new site is importing users and their content profile nodes from a different Drupal site, that was setup a year or two ago to manage an event.

I had hoped there would be a way for me to export these users and their profile nodes from one Drupal to the other, but though I found modules to export one or the other, I might still end up with profile nodes that were no longer related to their users. Of course, that's pretty useless.

When I remembered I was also supposed to add all these users to a simplenews newsletter, the proverbial light bulb came on.