EllisLab/CodeIgniter — pull request #1124 by tubalmartin (2012-03-05 00:39:29+00:00)
Title: Unit tests: Updated unit tests for url_title() helper function

@philsturgeon

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).

For example:

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.