I've already written the tests. However I've noticed the url_title() function in the feature/unit-tests branch is a bit different from the one in the 2.1-stable branch (the one I requested for a merge).
The unit-tests branch version uses === 'dash' instead of ==. That's fine but why not use the identical operator for === 'underscore' too?
Here's another one, the unit-tests branch version makes a double trim trim(trim(...)). That's useless since the regular expression '\s+' takes care of leading and trailing spaces (spaces get converted to $separator).
I don't know who introduced those changes but they are not needed IMHO and I don't understand how Unit tests can be useful when the code used in unit tests can be different from the production code.
Updated unit tests for url_title() helper function
Thanks for the explanation Phil ;)