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. 

Cheesy open source

Mmmm, delicious!

What's better than cheese? Nothing, surely.

Actually, there is: open source cheese. And stop calling me Shirley.

Last saturday I finally cashed in on last year's birthday present, a one-day cheese making course at the William Angliss instutute of TAFE taught by Giorgio Linguanti of La Latteria fame. The course teaches how to make fresh mozzarella and a basic pecorino style cheese called primosale.

Over the course of the day, Giorgio explained that he thinks the australian cheese industry is quite closed and not many producers are happy to share ideas and recipes with each other. That's as opposed to the part of Italy he's from, where people are forever talking with each other about how to make better and more interesting cheeses.

So in the spirit of open source cheese, here is Giorgio's mozzarella recipe, which makes a delicious cheese.

Date ordinals: An ugly solution to an ugly problem

Root out the unilingualist oppression!

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.