Testing times
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.
Testing times
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.
Date ordinals: An ugly solution to an ugly problem
A friend bumped into what appears to be a very irritating problem yesterday with the PHP date_format() function, which is used by format_date() to show date and time strings on Drupal. This function uses the "S" format character, which returns the english ordinal number suffix for the current day of the month. E.g: "st" on the first day, "nd" on the second day, and so on. (And the date() function does too, coincidentally)
The problem is that when you're working in a non-english locale, the ordinal suffixes returned remain the english ones. Oops.